From 8cad904f385dfe25e6dffe39a773641d02ed2776 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 10 Mar 2003 12:08:32 +0000 Subject: Don't segfault on make_server_info_guest() failure - instead return the error code. make_server_info_guest() requires an entry in the SAM at the moment, but this will change before release. Andrew Bartlett (This used to be commit 6a956390fa253e87e38b3f1909f13595fbf2767a) --- source3/smbd/sesssetup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index dfe246e398..2661fe3f93 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -39,16 +39,14 @@ static NTSTATUS do_map_to_guest(NTSTATUS status, auth_serversupplied_info **serv (lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_PASSWORD)) { DEBUG(3,("No such user %s [%s] - using guest account\n", user, domain)); - make_server_info_guest(server_info); - status = NT_STATUS_OK; + status = make_server_info_guest(server_info); } } 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)); - make_server_info_guest(server_info); - status = NT_STATUS_OK; + status = make_server_info_guest(server_info); } } -- cgit