mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
s3:smbd: only mark real guest sessions with the GUEST flag
Real anonymous sessions don't get it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11847 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> (similar to commit 79a71545bfc87525c6ba6c8fe9fa7d8a9da33441)
This commit is contained in:
parent
9b40c33ffe
commit
74afa66799
@ -285,7 +285,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
if (security_session_user_level(session_info, NULL) < SECURITY_USER) {
|
||||
if (security_session_user_level(session_info, NULL) == SECURITY_GUEST) {
|
||||
action |= SMB_SETUP_GUEST;
|
||||
}
|
||||
|
||||
@ -411,7 +411,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
if (security_session_user_level(session_info, NULL) < SECURITY_USER) {
|
||||
if (security_session_user_level(session_info, NULL) == SECURITY_GUEST) {
|
||||
action |= SMB_SETUP_GUEST;
|
||||
}
|
||||
|
||||
@ -940,7 +940,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
|
||||
/* perhaps grab OS version here?? */
|
||||
}
|
||||
|
||||
if (security_session_user_level(session_info, NULL) < SECURITY_USER) {
|
||||
if (security_session_user_level(session_info, NULL) == SECURITY_GUEST) {
|
||||
action |= SMB_SETUP_GUEST;
|
||||
}
|
||||
|
||||
|
@ -274,11 +274,12 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session,
|
||||
}
|
||||
|
||||
if (security_session_user_level(session_info, NULL) < SECURITY_USER) {
|
||||
/* we map anonymous to guest internally */
|
||||
*out_session_flags |= SMB2_SESSION_FLAG_IS_GUEST;
|
||||
*out_session_flags |= SMB2_SESSION_FLAG_IS_NULL;
|
||||
if (security_session_user_level(session_info, NULL) == SECURITY_GUEST) {
|
||||
*out_session_flags |= SMB2_SESSION_FLAG_IS_GUEST;
|
||||
}
|
||||
/* force no signing */
|
||||
x->global->signing_required = false;
|
||||
/* we map anonymous to guest internally */
|
||||
guest = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user