From 65c88c9cab9357b55e675b52485dc596bfe5dbfe Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 4 Feb 2008 17:07:54 +0100 Subject: 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) --- source3/nsswitch/wbinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit