From 0f1c800f8542297b9c1a6a4dff20263e3b6d9d40 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 27 Nov 2000 23:59:42 +0000 Subject: passdb/secrets.c passdb/smbpassfile.c smbd/server.c : Actually *use* the code written to transition from an old DOMAIN.MACHINE.MAC file to secrets.tdb. printing/nt_printing.c: Fix case insensitive name lookups for driver files. John - this should fix the Win9x/WinME problem correctly. Jeremy. (This used to be commit 8f3332a9acf413ac5d12053ca5c52733a4e946cc) --- source3/passdb/secrets.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'source3/passdb/secrets.c') diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 93347e737f..7700c0d28e 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -120,7 +120,7 @@ BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid) /************************************************************************ form a key for fetching a domain trust password ************************************************************************/ -static char *trust_keystr(char *domain) +char *trust_keystr(char *domain) { static fstring keystr; slprintf(keystr,sizeof(keystr),"%s/%s", SECRETS_MACHINE_ACCT_PASS, domain); @@ -137,8 +137,8 @@ BOOL secrets_fetch_trust_account_password(char *domain, uint8 ret_pwd[16], struct machine_acct_pass *pass; size_t size; - if (!(pass = secrets_fetch(trust_keystr(domain), &size)) || - size != sizeof(*pass)) return False; + if (!(pass = secrets_fetch(trust_keystr(domain), &size)) || size != sizeof(*pass)) + return False; if (pass_last_set_time) *pass_last_set_time = pass->mod_time; memcpy(ret_pwd, pass->hash, 16); @@ -159,3 +159,12 @@ BOOL secrets_store_trust_account_password(char *domain, uint8 new_pwd[16]) return secrets_store(trust_keystr(domain), (void *)&pass, sizeof(pass)); } + +/************************************************************************ + Routine to delete the trust account password file for a domain. +************************************************************************/ + +BOOL trust_password_delete(char *domain) +{ + return secrets_delete(trust_keystr(domain)); +} -- cgit