1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

Handle the case where the password used in RPC connections (for restrict

anonymous support) is blank.
(This used to be commit b376b7dad003593d26c867ffe8f906084e42160e)
This commit is contained in:
Tim Potter 2002-11-02 01:06:10 +00:00
parent c49573e59f
commit 500905fedb

View File

@ -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("");