summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-11-02 01:06:10 +0000
committerTim Potter <tpot@samba.org>2002-11-02 01:06:10 +0000
commit500905fedb0ff6b054ea121e8b42529d69a16ae7 (patch)
treebbf7bac0d3dd2d6430eb56b7f1bf5dca5bead460 /source3/nsswitch
parentc49573e59f06e25031fa84022005166e62cd7506 (diff)
downloadsamba-500905fedb0ff6b054ea121e8b42529d69a16ae7.tar.gz
samba-500905fedb0ff6b054ea121e8b42529d69a16ae7.tar.bz2
samba-500905fedb0ff6b054ea121e8b42529d69a16ae7.zip
Handle the case where the password used in RPC connections (for restrict
anonymous support) is blank. (This used to be commit b376b7dad003593d26c867ffe8f906084e42160e)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_cm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c
index 5f477c78f7..bbf5b90495 100644
--- a/source3/nsswitch/winbindd_cm.c
+++ b/source3/nsswitch/winbindd_cm.c
@@ -316,11 +316,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("");