summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_misc.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-10 10:23:54 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-10 10:23:54 +0000
commitcf00e41421793d042f24d0b0ecf47237a3cfc7c2 (patch)
tree89a8d82ec580aa5ba670dc933388682a95239a2a /source3/nsswitch/winbindd_misc.c
parent692215e4858cb4ac14af58f7e9422c2b15c999b4 (diff)
downloadsamba-cf00e41421793d042f24d0b0ecf47237a3cfc7c2.tar.gz
samba-cf00e41421793d042f24d0b0ecf47237a3cfc7c2.tar.bz2
samba-cf00e41421793d042f24d0b0ecf47237a3cfc7c2.zip
This changes the winbind protcol a bit:
It adds a 'ping' request, just to check winbind is in fact alive It also changes winbindd_pam_auth_crap to take usernames and domain seperatly. (backward incompatible change, needs merge to 2.2, but this is not yet released code, so no workarounds) Finally, it adds some debugs and fixes a few memory leaks (uses talloc to do it). Andrew Bartlett (This used to be commit 6df29bfe335144a968f5367f624ef2b4cf9e69b0)
Diffstat (limited to 'source3/nsswitch/winbindd_misc.c')
-rw-r--r--source3/nsswitch/winbindd_misc.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c
index 2718a75385..2cfea9bbb6 100644
--- a/source3/nsswitch/winbindd_misc.c
+++ b/source3/nsswitch/winbindd_misc.c
@@ -31,18 +31,9 @@ extern pstring global_myname;
static BOOL _get_trust_account_password(char *domain, unsigned char *ret_pwd,
time_t *pass_last_set_time)
{
- struct machine_acct_pass *pass;
- size_t size;
-
- if (!(pass = secrets_fetch(trust_keystr(domain), &size)) ||
- size != sizeof(*pass))
+ if (!secrets_fetch_trust_account_password(domain, ret_pwd, pass_last_set_time)) {
return False;
-
- if (pass_last_set_time)
- *pass_last_set_time = pass->mod_time;
-
- memcpy(ret_pwd, pass->hash, 16);
- SAFE_FREE(pass);
+ }
return True;
}
@@ -150,3 +141,11 @@ enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state
return WINBINDD_OK;
}
+
+enum winbindd_result winbindd_ping(struct winbindd_cli_state
+ *state)
+{
+ DEBUG(3, ("[%5d]: ping\n", state->pid));
+
+ return WINBINDD_OK;
+}