diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-01-07 10:11:24 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-01-07 10:11:24 +0000 |
commit | 43a4e1dbf99902e641aca02329f855685f8b01ec (patch) | |
tree | 1b1a6ff84a0be2c81b56b47d1dc62425d2e36978 /source3/nsswitch/wbinfo.c | |
parent | a0fb9600d594df3d163d69030d8f2f03dcb7a1b1 (diff) | |
download | samba-43a4e1dbf99902e641aca02329f855685f8b01ec.tar.gz samba-43a4e1dbf99902e641aca02329f855685f8b01ec.tar.xz samba-43a4e1dbf99902e641aca02329f855685f8b01ec.zip |
Don't duplicate pulling the 'IPC' username from secrets.tdb, instead
just use one function for both places.
Andrew Bartlett
(This used to be commit 85da181e8a0ade839f6d595fabdf4cea606f82e1)
Diffstat (limited to 'source3/nsswitch/wbinfo.c')
-rw-r--r-- | source3/nsswitch/wbinfo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index 7d25524f8ee..74f341a4904 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -909,14 +909,14 @@ static void wbinfo_get_auth_user(void) char *user, *domain, *password; /* Lift data from secrets file */ + + secrets_fetch_ipc_userpass(&user, &domain, &password); - secrets_init(); - - user = secrets_fetch(SECRETS_AUTH_USER, NULL); - domain = secrets_fetch(SECRETS_AUTH_DOMAIN, NULL); - password = secrets_fetch(SECRETS_AUTH_PASSWORD, NULL); + if ((!user || !*user) && (!domain || !*domain ) && (!password || !*password)){ - if (!user && !domain && !password) { + SAFE_FREE(user); + SAFE_FREE(domain); + SAFE_FREE(password); d_printf("No authorised user configured\n"); return; } |