r1936: Fix bug noticed by Steve - ensure extended security bit is on only
authorJeremy Allison <jra@samba.org>
Thu, 19 Aug 2004 20:03:41 +0000 (20:03 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:24 +0000 (10:52 -0500)
if we negotiated extended security. Do not merge for 3.0.6. Works
with W2K but needs further testing.
Jeremy.
(This used to be commit 284689aa18d2711a9041598cdf490359466f7f77)

source3/smbd/negprot.c
source3/smbd/process.c

index 5ff53f63007113dd579e76842a58216d9193d937..5ee8abbe6baaa31867d70f00190547e7fa5ced56 100644 (file)
@@ -249,6 +249,7 @@ static int reply_nt1(char *inbuf, char *outbuf)
            (SVAL(inbuf, smb_flg2) & FLAGS2_EXTENDED_SECURITY)) {
                negotiate_spnego = True;
                capabilities |= CAP_EXTENDED_SECURITY;
+               add_to_common_flags2(FLAGS2_EXTENDED_SECURITY);
        }
        
        capabilities |= CAP_NT_SMBS|CAP_RPC_REMOTE_APIS|CAP_UNICODE;
index 60ce1499e8dc1c3fa48decd153c5b3b22ae7ce3f..5be68d9f0a18ddcea579679a3fb14ca5ad99ee64 100644 (file)
@@ -1130,7 +1130,12 @@ const char *smb_fn_name(int type)
  Helper functions for contruct_reply.
 ****************************************************************************/
 
-static uint32 common_flags2 = FLAGS2_LONG_PATH_COMPONENTS|FLAGS2_EXTENDED_SECURITY|FLAGS2_32_BIT_ERROR_CODES;
+static uint32 common_flags2 = FLAGS2_LONG_PATH_COMPONENTS|FLAGS2_32_BIT_ERROR_CODES;
+
+void add_to_common_flags2(uint32 v)
+{
+       common_flags2 |= v;
+}
 
 void remove_from_common_flags2(uint32 v)
 {