From: Fredrik Tolf Date: Tue, 12 Apr 2011 09:19:56 +0000 (+0200) Subject: userplex: Run each handler in its own session. X-Git-Tag: 0.8~19 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=3227f13ea5a31e6f94d98ddc3b8c5a42d2f7db51 userplex: Run each handler in its own session. --- diff --git a/src/userplex.c b/src/userplex.c index b66490f..699cbe5 100644 --- a/src/userplex.c +++ b/src/userplex.c @@ -53,6 +53,7 @@ static void login(struct passwd *pwd) { int fd; + setsid(); if(getuid() == 0) { if(initgroups(pwd->pw_name, pwd->pw_gid)) { flog(LOG_ERR, "could not init group list for %s: %s", pwd->pw_name, strerror(errno));