summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-01-15 05:27:35 +0000
committerJeremy Allison <jra@samba.org>1998-01-15 05:27:35 +0000
commit7a5da295dbbf9c8f6d858cb61a7b4fffdc7a2f9b (patch)
treeea71aa11fa2879715cf4dc12e0cb513b96aa9203 /source
parent54140f312fd41d8d3c4f2d988ce6379ef3f6fca4 (diff)
downloadsamba-7a5da295dbbf9c8f6d858cb61a7b4fffdc7a2f9b.tar.gz
samba-7a5da295dbbf9c8f6d858cb61a7b4fffdc7a2f9b.tar.xz
samba-7a5da295dbbf9c8f6d858cb61a7b4fffdc7a2f9b.zip
server.c: Added fix to stop security=share from using vuid.
Jeremy
Diffstat (limited to 'source')
-rw-r--r--source/smbd/server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 1b4f6f35d0f..aaf446bdf5a 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -4681,6 +4681,8 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
int flags = smb_messages[match].flags;
/* In share mode security we must ignore the vuid. */
uint16 session_tag = (lp_security() == SEC_SHARE) ? UID_FIELD_INVALID : SVAL(inbuf,smb_uid);
+ /* Ensure this value is replaced in the incoming packet. */
+ SSVAL(inbuf,smb_uid,session_tag);
/* does this protocol need to be run as root? */
if (!(flags & AS_USER))
@@ -5133,7 +5135,7 @@ static void usage(char *pname)
charset_initialise();
- /* make absolutely sure we run as root - to handle cases whre people
+ /* make absolutely sure we run as root - to handle cases where people
are crazy enough to have it setuid */
#ifdef USE_SETRES
setresuid(0,0,0);