From c9bde9ae753939710d63262917accca1dabe9a52 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 27 Jul 2011 13:20:59 +1000 Subject: s3-auth Use else if in do_map_to_guest_server_info This means we can't ever call make_server_info_guest() twice. Andrew Bartlett Signed-off-by: Andrew Tridgell --- source3/auth/auth_util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source3/auth') diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 1621630b87..530b8da096 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1600,9 +1600,7 @@ NTSTATUS do_map_to_guest_server_info(NTSTATUS status, user, domain)); status = make_server_info_guest(NULL, server_info); } - } - - if (NT_STATUS_EQUAL(status, NT_STATUS_WRONG_PASSWORD)) { + } else if (NT_STATUS_EQUAL(status, NT_STATUS_WRONG_PASSWORD)) { if (lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_PASSWORD) { DEBUG(3,("Registered username %s for guest access\n", user)); -- cgit