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 | dcd6e735f709a9231860ceb9682db40ff26c9a66 (patch) | |
tree | 65371fd2a262652a821deee9a03bbe32b0d52d58 /source/nsswitch/winbindd_misc.c | |
parent | 06608971ed95c02188a1b2bf7b1f9a2845e04022 (diff) | |
download | samba-dcd6e735f709a9231860ceb9682db40ff26c9a66.tar.gz samba-dcd6e735f709a9231860ceb9682db40ff26c9a66.tar.xz samba-dcd6e735f709a9231860ceb9682db40ff26c9a66.zip |
the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
Diffstat (limited to 'source/nsswitch/winbindd_misc.c')
-rw-r--r-- | source/nsswitch/winbindd_misc.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source/nsswitch/winbindd_misc.c b/source/nsswitch/winbindd_misc.c index b98e89888b3..d0851f5113b 100644 --- a/source/nsswitch/winbindd_misc.c +++ b/source/nsswitch/winbindd_misc.c @@ -61,10 +61,9 @@ BOOL _get_trust_account_password(char *domain, unsigned char *ret_pwd, /* Check the machine account password is valid */ -enum winbindd_result winbindd_check_machine_acct( - struct winbindd_cli_state *state) +enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *state) { - int result = WINBINDD_ERROR; + NTSTATUS status; uchar trust_passwd[16]; struct in_addr *ip_list = NULL; int count; @@ -79,7 +78,7 @@ enum winbindd_result winbindd_check_machine_acct( again: if (!_get_trust_account_password(lp_workgroup(), trust_passwd, NULL)) { - result = NT_STATUS_INTERNAL_ERROR; + status = NT_STATUS_INTERNAL_ERROR; goto done; } @@ -90,7 +89,7 @@ enum winbindd_result winbindd_check_machine_acct( controller)) { DEBUG(0, ("could not find domain controller for " "domain %s\n", lp_workgroup())); - result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; + status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; goto done; } @@ -102,7 +101,7 @@ enum winbindd_result winbindd_check_machine_acct( global_myname); #if 0 /* XXX */ - result = cli_nt_setup_creds(controller, lp_workgroup(), global_myname, + status = cli_nt_setup_creds(controller, lp_workgroup(), global_myname, trust_account, trust_passwd, SEC_CHAN_WKSTA, &validation_level); #endif @@ -115,7 +114,7 @@ enum winbindd_result winbindd_check_machine_acct( #define MAX_RETRIES 8 if ((num_retries < MAX_RETRIES) && - result == NT_STATUS_ACCESS_DENIED) { + NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_ACCESS_DENIED)) { num_retries++; goto again; } @@ -123,11 +122,10 @@ enum winbindd_result winbindd_check_machine_acct( /* Pass back result code - zero for success, other values for specific failures. */ - DEBUG(3, ("secret is %s\n", (result == NT_STATUS_OK) ? - "good" : "bad")); + DEBUG(3, ("secret is %s\n", NT_STATUS_IS_OK(status) ? "good" : "bad")); done: - state->response.data.num_entries = result; + state->response.data.num_entries = NT_STATUS_V(status); return WINBINDD_OK; } |