Fixes for the %U and %G problems people have reported.
authorJeremy Allison <jra@samba.org>
Wed, 6 May 1998 01:34:51 +0000 (01:34 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 6 May 1998 01:34:51 +0000 (01:34 +0000)
commitb5187ad6a3b3af9fbbeee8bced0ab16b41e9825b
tree5ae588fda3345a9e1b7a4a076884e2bdb5425a74
parent567d3f838988cafab4770fce1cf68b73085e6c71
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.
source/include/proto.h
source/include/smb.h
source/printing/printing.c
source/smbd/ipc.c
source/smbd/message.c
source/smbd/password.c
source/smbd/reply.c
source/smbd/server.c
source/smbd/uid.c