summaryrefslogtreecommitdiff
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
commitda8048b4fa8b60ec3cb3033d19d4a451f259befb (patch)
treeb5e25db73b267f383c734491d5f86e3c1d08d9a9
parent7c6c6b66280d717a8c8efd9fa2a7aa39240b151f (diff)
downloadsamba-da8048b4fa8b60ec3cb3033d19d4a451f259befb.tar.gz
samba-da8048b4fa8b60ec3cb3033d19d4a451f259befb.tar.bz2
samba-da8048b4fa8b60ec3cb3033d19d4a451f259befb.zip
call initgroups before becomming the user; patch from Fabio Cecchi
(This used to be commit 5a8dbccd66911642fabb6b8b38fff4477b76c3a1)
-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 */