diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-09-04 07:13:01 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-09-04 07:13:01 +0000 |
commit | 19fea3242cf6234786b6cbb60631e0071f31ff9f (patch) | |
tree | 1de6e79890a80a1e03cf0dce5813513aaf51bc59 /source3/auth/auth.c | |
parent | 55cf37488f66eba2826dba08e80dd4ab6df33fc3 (diff) | |
download | samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.tar.gz samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.tar.bz2 samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.zip |
the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
Diffstat (limited to 'source3/auth/auth.c')
-rw-r--r-- | source3/auth/auth.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c index d6bc8aeadc..b707c38c62 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -68,15 +68,15 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info, return NT_STATUS_LOGON_FAILURE; } - if (nt_status != NT_STATUS_OK) { + if (!NT_STATUS_IS_OK(nt_status)) { nt_status = check_rhosts_security(user_info, server_info); } - if ((lp_security() == SEC_DOMAIN) && (nt_status != NT_STATUS_OK)) { + if ((lp_security() == SEC_DOMAIN) && !NT_STATUS_IS_OK(nt_status)) { nt_status = check_domain_security(user_info, server_info); } - if ((lp_security() == SEC_SERVER) && (nt_status != NT_STATUS_OK)) { + if ((lp_security() == SEC_SERVER) && !NT_STATUS_IS_OK(nt_status)) { nt_status = check_server_security(user_info, server_info); } @@ -84,7 +84,7 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info, smb_user_control(user_info->smb_username.str, nt_status); } - if (nt_status != NT_STATUS_OK) { + if (!NT_STATUS_IS_OK(nt_status)) { if ((user_info->plaintext_password.len > 0) && (!lp_plaintext_to_smbpasswd())) { nt_status = check_unix_security(user_info, server_info); @@ -94,14 +94,14 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info, } } - if ((nt_status == NT_STATUS_OK) && !done_pam) { + if (NT_STATUS_IS_OK(nt_status) && !done_pam) { /* We might not be root if we are an RPC call */ become_root(); nt_status = smb_pam_accountcheck(user_info->smb_username.str); unbecome_root(); } - if (nt_status == NT_STATUS_OK) { + if (NT_STATUS_IS_OK(nt_status)) { DEBUG(5, ("check_password: Password for user %s suceeded\n", user_info->smb_username.str)); } else { DEBUG(3, ("check_password: Password for user %s FAILED with error %s\n", user_info->smb_username.str, get_nt_error_msg(nt_status))); @@ -233,11 +233,11 @@ BOOL password_ok(char *user, char *password, int pwlen) /* The password could be either NTLM or plain LM. Try NTLM first, but fall-through as required. */ - if (pass_check_smb(user, lp_workgroup(), NULL, 0, (unsigned char *)password, pwlen) == NT_STATUS_OK) { + if (NT_STATUS_IS_OK(pass_check_smb(user, lp_workgroup(), NULL, 0, (unsigned char *)password, pwlen))) { return True; } - if (pass_check_smb(user, lp_workgroup(), (unsigned char *)password, pwlen, NULL, 0) == NT_STATUS_OK) { + if (NT_STATUS_IS_OK(pass_check_smb(user, lp_workgroup(), (unsigned char *)password, pwlen, NULL, 0))) { return True; } |