1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

r2657: if we are already fully authenticated in session setup then the vuid is ignored

(This used to be commit 50d5c638a3710855be67cd41dccc9658d64b70fd)
This commit is contained in:
Andrew Tridgell 2004-09-26 11:24:39 +00:00 committed by Gerald (Jerry) Carter
parent aeb9d1e1ad
commit 5d45a332d5

View File

@ -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)));