summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-20 09:32:03 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-20 09:32:03 +0000
commit01a382480a148f70384da65b38c936bedcb4ba6b (patch)
treec3e1a6b0a03e0756eef9c30317c2a063fbac3447
parent1a242b6fd9c6f7dc43b629d0dc22ff42053e3c32 (diff)
downloadsamba-01a382480a148f70384da65b38c936bedcb4ba6b.tar.gz
samba-01a382480a148f70384da65b38c936bedcb4ba6b.tar.bz2
samba-01a382480a148f70384da65b38c936bedcb4ba6b.zip
don't use server_info after its been freed
(This used to be commit ee161a57289409e2fa43e33b045473077c7b6ba5)
-rw-r--r--source3/smbd/sesssetup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 7fd0fd917a..8424e0e186 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -325,6 +325,7 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
uint32 ntlmssp_command, neg_flags;
NTSTATUS nt_status;
int sess_vuid;
+ BOOL as_guest;
auth_usersupplied_info *user_info = NULL;
auth_serversupplied_info *server_info = NULL;
@@ -392,8 +393,9 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
return ERROR_NT(nt_status_squash(nt_status));
}
- sess_vuid = register_vuid(server_info, user);
+ as_guest = server_info->guest;
+ sess_vuid = register_vuid(server_info, user);
free_server_info(&server_info);
SAFE_FREE(user);
@@ -405,7 +407,7 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
set_message(outbuf,4,0,True);
SSVAL(outbuf, smb_vwv3, 0);
- if (server_info->guest) {
+ if (as_guest) {
SSVAL(outbuf,smb_vwv2,1);
}