mirror of
https://github.com/samba-team/samba.git
synced 2025-07-31 20:22:15 +03:00
s3:libsmb: use password = NULL for anonymous connections
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11858 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
This commit is contained in:
@ -1325,6 +1325,17 @@ static struct tevent_req *cli_session_setup_gensec_send(
|
||||
talloc_set_destructor(
|
||||
state, cli_session_setup_gensec_state_destructor);
|
||||
|
||||
if (user == NULL || strlen(user) == 0) {
|
||||
if (pass != NULL && strlen(pass) == 0) {
|
||||
/*
|
||||
* some callers pass "" as no password
|
||||
*
|
||||
* gensec only handles NULL as no password.
|
||||
*/
|
||||
pass = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
status = auth_generic_client_prepare(state, &state->auth_generic);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
return tevent_req_post(req, ev);
|
||||
|
Reference in New Issue
Block a user