summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-02-04 17:07:54 +0100
committerMichael Adam <obnox@samba.org>2008-02-04 17:27:54 +0100
commit65c88c9cab9357b55e675b52485dc596bfe5dbfe (patch)
treedaaac03d57a0f8c66476d56c1f879faf92f047fc
parent30dcc73d969a0761605e8649d68dc83ba24b9d67 (diff)
downloadsamba-65c88c9cab9357b55e675b52485dc596bfe5dbfe.tar.gz
samba-65c88c9cab9357b55e675b52485dc596bfe5dbfe.tar.bz2
samba-65c88c9cab9357b55e675b52485dc596bfe5dbfe.zip
Prevent a segfault when "wbinfo -a" is called without password.
wbcAuthenticateUser segfaults when passed NULL as password. This only changes the caller in wbinfo.c to pass an empty password string to wbcAuthenticateUser(). Michael (This used to be commit 3cbc7c19eba68427160e09e865edc85c7fe38413)
-rw-r--r--source3/nsswitch/wbinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index 3410668fcd..c13b4b64e0 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -875,10 +875,12 @@ static bool wbinfo_auth(char *username)
if ((p = strchr(s, '%')) != NULL) {
*p = 0;
p++;
+ password = p;
+ } else {
+ password = "";
}
name = s;
- password = p;
wbc_status = wbcAuthenticateUser(name, password);