From 831d01122ab387df157f4f8cc97a4dc9ca29438a Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Sun, 22 Aug 2004 19:04:59 +0000 Subject: [PATCH] - fix: secure_enviroment - set proper EGID (by Daniel Mueller) --- ChangeLog | 3 ++- src/utils.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0202798..e6e85c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 0.5.8 ===== - 19-Aug-2004: - don't crash on missing Contact header during registration + 22-Aug-2004: - fix: secure_enviroment - set proper EGID (by Daniel Mueller) + 19-Aug-2004: - fix: don't crash on missing Contact header during registration 18-Aug-2004: - reworked configure.in for FLI4L building 06-Jul-2004: - patch from Dan Weber: Open the password file for SIP accounts at startup, so we still have access after diff --git a/src/utils.c b/src/utils.c index ca7506e..8984fe5 100644 --- a/src/utils.c +++ b/src/utils.c @@ -271,12 +271,13 @@ void secure_enviroment (void) { DEBUGC(DBCLASS_CONFIG,"changed gid to %i - %s", passwd->pw_gid, (sts==0)?"Ok":"Failed"); - sts = setegid(passwd->pw_uid); + sts = setegid(passwd->pw_gid); DEBUGC(DBCLASS_CONFIG,"changed egid to %i - %s", passwd->pw_gid, (sts==0)?"Ok":"Failed"); /* don't set the real user id - as we need to elevate privs when setting up an RTP masquerading tunnel */ +/*&&& Actually this is no longer true (7-Jul-2004/xar) */ // sts = setuid(passwd->pw_uid); // DEBUGC(DBCLASS_CONFIG,"changed uid to %i - %s", // passwd->pw_uid, (sts==0)?"Ok":"Failed");