From aed20178dfa880301163bed5192e42712bc64146 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 2 Nov 2002 01:05:47 +0000 Subject: Handle the case where the password used in RPC connections (for restrict anonymous support) is blank. (This used to be commit 7badccda46a0837dd9da802b44c2fbcb4f38845a) --- source3/nsswitch/winbindd_cm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 3b83fde95b..0287d2a866 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -267,11 +267,16 @@ static void cm_get_ipc_userpass(char **username, char **domain, char **password) *password = secrets_fetch(SECRETS_AUTH_PASSWORD, NULL); if (*username && **username) { - if (!*domain || !**domain) { + + if (!*domain || !**domain) *domain = smb_xstrdup(lp_workgroup()); - } - DEBUG(3, ("IPC$ connections done by user %s\\%s\n", *domain, *username)); + if (!*password || !**password) + *password = smb_xstrdup(""); + + DEBUG(3, ("IPC$ connections done by user %s\\%s\n", + *domain, *username)); + } else { DEBUG(3, ("IPC$ connections done anonymously\n")); *username = smb_xstrdup(""); -- cgit