diff options
author | Tim Potter <tpot@samba.org> | 2001-11-23 00:14:04 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-11-23 00:14:04 +0000 |
commit | 5788899a480c3b4c79a1970dbd1634cc3fed4de6 (patch) | |
tree | 98dbdcaabca79f8697cb705cc81fec5dc9aa8aca /source3/nsswitch/winbindd_pam.c | |
parent | 2025ef4c18b0fdf79e493c2c97e32bc38019424b (diff) | |
download | samba-5788899a480c3b4c79a1970dbd1634cc3fed4de6.tar.gz samba-5788899a480c3b4c79a1970dbd1634cc3fed4de6.tar.bz2 samba-5788899a480c3b4c79a1970dbd1634cc3fed4de6.zip |
Fixed check machine account function.
(This used to be commit 8f01a8b07883d18f44da665cbc8e5fba04d3bc91)
Diffstat (limited to 'source3/nsswitch/winbindd_pam.c')
-rw-r--r-- | source3/nsswitch/winbindd_pam.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index aa248aadaf..57733b5471 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 3.0 - Winbind daemon - pam auuth funcions + Winbind daemon - pam auth funcions Copyright (C) Andrew Tridgell 2000 Copyright (C) Tim Potter 2001 @@ -102,9 +102,11 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) ZERO_STRUCT(info3); - if (!(cli = cm_get_netlogon_cli(lp_workgroup(), trust_passwd))) { + result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli); + + if (!NT_STATUS_IS_OK(result)) { DEBUG(3, ("could not open handle to NETLOGON pipe\n")); - return WINBINDD_ERROR; + goto done; } result = cli_nt_login_network(cli, user_info, smb_uid_low, @@ -113,7 +115,8 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) free_user_info(&user_info); cli_shutdown(cli); - + + done: return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } @@ -165,9 +168,11 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) ZERO_STRUCT(info3); - if (!(cli = cm_get_netlogon_cli(lp_workgroup(), trust_passwd))) { + result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli); + + if (!NT_STATUS_IS_OK(result)) { DEBUG(3, ("could not open handle to NETLOGON pipe\n")); - return WINBINDD_ERROR; + goto done; } result = cli_nt_login_network(cli, user_info, smb_uid_low, @@ -177,6 +182,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) cli_shutdown(cli); + done: return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } |