summaryrefslogtreecommitdiffstats
path: root/source/web/cgi.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-10-21 14:19:32 +0000
committerGerald Carter <jerry@samba.org>2003-10-21 14:19:32 +0000
commit5a8dbccd66911642fabb6b8b38fff4477b76c3a1 (patch)
tree6bc3a63e7e1111619903397120f29b3def6edd2a /source/web/cgi.c
parentf0a0771c02404c91cd64961f85622022a4e56b2f (diff)
downloadsamba-5a8dbccd66911642fabb6b8b38fff4477b76c3a1.tar.gz
samba-5a8dbccd66911642fabb6b8b38fff4477b76c3a1.tar.xz
samba-5a8dbccd66911642fabb6b8b38fff4477b76c3a1.zip
call initgroups before becomming the user; patch from Fabio Cecchi
Diffstat (limited to 'source/web/cgi.c')
-rw-r--r--source/web/cgi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/web/cgi.c b/source/web/cgi.c
index 212c2884b60..8e739cd224e 100644
--- a/source/web/cgi.c
+++ b/source/web/cgi.c
@@ -342,6 +342,9 @@ static BOOL cgi_handle_authorization(char *line)
* Password was ok.
*/
+ if ( initgroups(pass->pw_name, pass->pw_gid) != 0 )
+ goto err;
+
become_user_permanently(pass->pw_uid, pass->pw_gid);
/* Save the users name */