summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-10-21 14:20:02 +0000
committerGerald Carter <jerry@samba.org>2003-10-21 14:20:02 +0000
commit2e9e9ff31bd865d4955b7b851a09c2b331f363f8 (patch)
treeeee243c0399fa4ba3b0fcb63227bc6e4c0f5c52c /source3/web
parentcc14d8c56151ee0e798dc2c9122d3ba8da982e7a (diff)
downloadsamba-2e9e9ff31bd865d4955b7b851a09c2b331f363f8.tar.gz
samba-2e9e9ff31bd865d4955b7b851a09c2b331f363f8.tar.bz2
samba-2e9e9ff31bd865d4955b7b851a09c2b331f363f8.zip
call initgroups before becomming the user; patch from Fabio Cecchi
(This used to be commit e0db859a312207d961e3a581dfd15d9701bca16d)
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/cgi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 212c2884b6..8e739cd224 100644
--- a/source3/web/cgi.c
+++ b/source3/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 */