summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd_pam.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-11-23 00:14:04 +0000
committerTim Potter <tpot@samba.org>2001-11-23 00:14:04 +0000
commit8f01a8b07883d18f44da665cbc8e5fba04d3bc91 (patch)
tree8b1516362f07cb3314cca67534791aa315c319a8 /source/nsswitch/winbindd_pam.c
parent5d343b40650464ae70037fd6e3fd96a9865fa611 (diff)
downloadsamba-8f01a8b07883d18f44da665cbc8e5fba04d3bc91.tar.gz
samba-8f01a8b07883d18f44da665cbc8e5fba04d3bc91.tar.xz
samba-8f01a8b07883d18f44da665cbc8e5fba04d3bc91.zip
Fixed check machine account function.
Diffstat (limited to 'source/nsswitch/winbindd_pam.c')
-rw-r--r--source/nsswitch/winbindd_pam.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c
index aa248aadaf8..57733b54717 100644
--- a/source/nsswitch/winbindd_pam.c
+++ b/source/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;
}