summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-06 01:34:51 +0000
committerJeremy Allison <jra@samba.org>1998-05-06 01:34:51 +0000
commita2bddb20ed078c3e1b9cb60a7420b3d107898f52 (patch)
tree4d79e33ce1cb534d287aa9ccbe8e6c10aa0ceb9b /source3/smbd/reply.c
parent19f76f391b97b405879fd8574e711a6d59e4e60c (diff)
downloadsamba-a2bddb20ed078c3e1b9cb60a7420b3d107898f52.tar.gz
samba-a2bddb20ed078c3e1b9cb60a7420b3d107898f52.tar.bz2
samba-a2bddb20ed078c3e1b9cb60a7420b3d107898f52.zip
Fixes for the %U and %G problems people have reported.
Essentially, multiple session_setup_and_X's may be done to an smbd. As there is only one global variable containing the requested connection name (sessionsetup_user), then any subsequent sessionsetups overwrite this name (causing %U and %G to get the wrong name). This is particularly common when an NT client does a null session setup to get a browse list after the user has connected, but before a share has been mounted. These changes store the requested_name in the vuid structure (so this only really works for user level and above security) and copies this name back into the global variable before the standard_sub call. Jeremy. (This used to be commit b5187ad6a3b3af9fbbeee8bced0ab16b41e9825b)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 3a0d4a9bee..50b977d49f 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -689,7 +689,7 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
/* register the name and uid as being validated, so further connections
to a uid can get through without a password, on the same VC */
- sess_vuid = register_vuid(uid,gid,user,guest);
+ sess_vuid = register_vuid(uid,gid,user,sesssetup_user,guest);
SSVAL(outbuf,smb_uid,sess_vuid);
SSVAL(inbuf,smb_uid,sess_vuid);