diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-05-18 06:42:50 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-05-18 06:42:50 +0000 |
commit | 3346a76674fc59ba8e1adb382d2fe477eddf1e96 (patch) | |
tree | 49496b451f48f2dffc1a0164360558ec1ddb5cbb | |
parent | 58e1fe62cc955c6b8449332447a6879c6fab64e7 (diff) | |
download | samba-3346a76674fc59ba8e1adb382d2fe477eddf1e96.tar.gz samba-3346a76674fc59ba8e1adb382d2fe477eddf1e96.tar.bz2 samba-3346a76674fc59ba8e1adb382d2fe477eddf1e96.zip |
As per rsharpe's request, require only a Masters in Astrophysics to
correctly configure winbind.
(Next job: Fill in the 'error_msg' field with somthing useful)
(This used to be commit 49ee2a25c131641887cbc438a6336652f042cfb0)
-rw-r--r-- | source3/nsswitch/wbinfo.c | 24 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_misc.c | 10 |
2 files changed, 18 insertions, 16 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index e36a144b8f..38cc049297 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -248,25 +248,21 @@ static BOOL wbinfo_show_sequence(void) static BOOL wbinfo_check_secret(void) { struct winbindd_response response; - BOOL result; + NSS_STATUS result; ZERO_STRUCT(response); result = winbindd_request(WINBINDD_CHECK_MACHACC, NULL, &response) == NSS_STATUS_SUCCESS; - - if (result) { - - if (response.data.num_entries == 0) - d_printf("Secret is good\n"); - else - d_printf("Secret is bad\n0x%08x\n", - response.data.num_entries); - - return True; - } - - return False; + + d_printf("checking the trust secret via RPC calls %s\n", + (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed"); + + d_printf("error code was %s (0x%x)\n", + response.data.auth.nt_status_string, + response.data.auth.nt_status); + + return result == NSS_STATUS_SUCCESS; } /* Convert uid to sid */ diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c index 5678bdaa5a..f465f783b4 100644 --- a/source3/nsswitch/winbindd_misc.c +++ b/source3/nsswitch/winbindd_misc.c @@ -88,9 +88,15 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat "good" : "bad")); done: - state->response.data.num_entries = NT_STATUS_V(result); + state->response.data.auth.nt_status = NT_STATUS_V(result); + fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result)); + fstrcpy(state->response.data.auth.error_string, nt_errstr(result)); + state->response.data.auth.pam_error = nt_status_to_pam(result); - return WINBINDD_OK; + DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Checking the trust account password returned %s\n", + state->response.data.auth.nt_status_string)); + + return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state |