Ensure that if we are in share mode security that the smb_uid
authorJeremy Allison <jra@samba.org>
Wed, 7 Jan 1998 08:29:15 +0000 (08:29 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 7 Jan 1998 08:29:15 +0000 (08:29 +0000)
field is invalid.
Jeremy.

source/smbd/server.c

index 5eb360bbe7a7eb55a878da8995eed3d98e33ec71..93d2a9756df8413d16ba81e1176db1c91ceaec12 100644 (file)
@@ -4670,7 +4670,8 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
        {
          int cnum = SVAL(inbuf,smb_tid);
          int flags = smb_messages[match].flags;
-         uint16 session_tag = SVAL(inbuf,smb_uid);
+          /* In share mode security we must ignore the vuid. */
+         uint16 session_tag = (lp_security() == SEC_SHARE) ? UID_FIELD_INVALID : SVAL(inbuf,smb_uid);
 
          /* does this protocol need to be run as root? */
          if (!(flags & AS_USER))