From cf00e41421793d042f24d0b0ecf47237a3cfc7c2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 10 Jan 2002 10:23:54 +0000 Subject: 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) --- source3/nsswitch/winbindd_misc.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'source3/nsswitch/winbindd_misc.c') 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; +} -- cgit