]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Subtract NT_STATUS from common flag, don't add it...
authorJeremy Allison <jra@samba.org>
Mon, 1 Dec 2003 06:19:14 +0000 (06:19 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 1 Dec 2003 06:19:14 +0000 (06:19 +0000)
Jeremy.

source/smbd/process.c
source/smbd/sesssetup.c

index d93826bc7e2a9f4f3668cba2faa28e059216b525..5206dc70f80b754606c57476f65f61f31dc27777 100644 (file)
@@ -928,11 +928,11 @@ const char *smb_fn_name(int type)
  Helper functions for contruct_reply.
 ****************************************************************************/
 
-static uint32 common_flags2 = FLAGS2_LONG_PATH_COMPONENTS|FLAGS2_EXTENDED_SECURITY;
+static uint32 common_flags2 = FLAGS2_LONG_PATH_COMPONENTS|FLAGS2_EXTENDED_SECURITY|FLAGS2_32_BIT_ERROR_CODES;
 
-void add_to_common_flags2(uint32 v)
+void remove_from_common_flags2(uint32 v)
 {
-       common_flags2 |= v;
+       common_flags2 &= ~v;
 }
 
 void construct_reply_common(char *inbuf,char *outbuf)
index fb0744bb730ce63a78d08c3d546b20568be9d0a6..ec01a330ee255d8f568dfa84a7e6d8297b218ae9 100644 (file)
@@ -473,8 +473,8 @@ static int reply_sesssetup_and_X_spnego(connection_struct *conn, char *inbuf,
        if (global_client_caps == 0) {
                global_client_caps = IVAL(inbuf,smb_vwv10);
 
-               if (global_client_caps & CAP_STATUS32) {
-                       add_to_common_flags2(FLAGS2_32_BIT_ERROR_CODES);
+               if (!(global_client_caps & CAP_STATUS32)) {
+                       remove_from_common_flags2(FLAGS2_32_BIT_ERROR_CODES);
                }
 
        }
@@ -623,8 +623,8 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
                if(global_client_caps == 0) {
                        global_client_caps = IVAL(inbuf,smb_vwv11);
                
-                       if (global_client_caps & CAP_STATUS32) {
-                               add_to_common_flags2(FLAGS2_32_BIT_ERROR_CODES);
+                       if (!(global_client_caps & CAP_STATUS32)) {
+                               remove_from_common_flags2(FLAGS2_32_BIT_ERROR_CODES);
                        }
 
                        /* client_caps is used as final determination if client is NT or Win95.