More logical operations on booleans. IBM checker.
authorJeremy Allison <jra@samba.org>
Sat, 5 Jan 2008 07:24:15 +0000 (23:24 -0800)
committerJeremy Allison <jra@samba.org>
Sat, 5 Jan 2008 07:24:15 +0000 (23:24 -0800)
Jeremy.

source/auth/auth_domain.c
source/auth/auth_winbind.c

index b2c87174fd332baa33dcc1cfef282dadbf043952..1de9869f9078e91d41957b6df7fb1cf0cbe94735 100644 (file)
@@ -270,7 +270,9 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
                                                &info3);
 
                if (NT_STATUS_IS_OK(nt_status)) {
-                       (*server_info)->was_mapped |= user_info->was_mapped;
+                       if (user_info->was_mapped) {
+                               (*server_info)->was_mapped = user_info->was_mapped;
+                       }
 
                        if ( ! (*server_info)->guest) {
                                /* if a real user check pam account restrictions */
index 959c550524be854bda7a6870de4c6e633ddcf7da..b24aa3a75b3a036c0d362d073000996ff210adcc 100644 (file)
@@ -134,7 +134,9 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context,
                        }
                        
                        if (NT_STATUS_IS_OK(nt_status)) {
-                               (*server_info)->was_mapped |= user_info->was_mapped;
+                               if (user_info->was_mapped) {
+                                       (*server_info)->was_mapped = user_info->was_mapped;
+                               }
                        }
                }
        } else if (NT_STATUS_IS_OK(nt_status)) {