diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-26 11:24:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:17 -0500 |
commit | 5d45a332d547cdda0759014cc833c4015b2cfad4 (patch) | |
tree | d28d779dbe7791f892abb1e445da3c86fced01a5 /source4 | |
parent | aeb9d1e1adb4a7d3c5745b9c5a6906cdc7a8ccb0 (diff) | |
download | samba-5d45a332d547cdda0759014cc833c4015b2cfad4.tar.gz samba-5d45a332d547cdda0759014cc833c4015b2cfad4.tar.bz2 samba-5d45a332d547cdda0759014cc833c4015b2cfad4.zip |
r2657: if we are already fully authenticated in session setup then the vuid is ignored
(This used to be commit 50d5c638a3710855be67cd41dccc9658d64b70fd)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/smb_server/sesssetup.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c index 2af4d2237f..9ada617985 100644 --- a/source4/smb_server/sesssetup.c +++ b/source4/smb_server/sesssetup.c @@ -209,18 +209,15 @@ static NTSTATUS sesssetup_spnego(struct smbsrv_request *req, union smb_sesssetup vuid = SVAL(req->in.hdr,HDR_UID); smb_sess = smbsrv_session_find(req->smb_conn, vuid); - if (smb_sess) { + if (smb_sess && !smb_sess->session_info) { if (!smb_sess->gensec_ctx) { return NT_STATUS_INVALID_HANDLE; } - /* what is when the client is already successful authentificated? */ - if (smb_sess->session_info) { - return NT_STATUS_ACCESS_DENIED; - } - status = gensec_update(smb_sess->gensec_ctx, req, sess->spnego.in.secblob, &sess->spnego.out.secblob); } else { + smb_sess = NULL; + status = gensec_server_start(req->smb_conn, &gensec_ctx); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Failed to start GENSEC server code: %s\n", nt_errstr(status))); |