summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-08-22 17:05:35 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-08-22 17:05:35 +0000
commit68b9a4cebc04ba80fb1fb37940e013bc680b589e (patch)
tree3f636dd4d2ddeb9c024d9a808abc7c3fbf84b003 /source3/smbd
parentf5a4487df573f8dfb2b6e18a492585220df1f5bb (diff)
downloadsamba-68b9a4cebc04ba80fb1fb37940e013bc680b589e.tar.gz
samba-68b9a4cebc04ba80fb1fb37940e013bc680b589e.tar.bz2
samba-68b9a4cebc04ba80fb1fb37940e013bc680b589e.zip
Ensure we don't change to a user that we can't get an NT_TOKEN for.
(This used to be commit 9416289b571b1c838239e5342bb6148041ab681b)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/uid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 6f91065ceb..2bda26aa51 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -178,6 +178,10 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid)
is_guest = True;
token = create_nt_token(uid, gid, current_user.ngroups, current_user.groups, is_guest);
+ if (!token) {
+ DEBUG(1, ("change_to_user: create_nt_token failed!\n"));
+ return False;
+ }
must_free_token = True;
}