1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3: smbd: always set vuid in check_user_ok()

A SMB session reauth will have invalidated conn->vuid via
conn_clear_vuid_caches().

Ensure conn->vuid always has the vuid of the current user in
check_user_ok().

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13351

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Mar 22 18:26:04 CET 2018 on sn-devel-144
This commit is contained in:
Ralph Boehme 2018-03-22 08:03:58 +01:00
parent dd1f8cdf6b
commit 42d6dd2f30

View File

@ -202,6 +202,7 @@ static bool check_user_ok(connection_struct *conn,
conn->session_info = ent->session_info; conn->session_info = ent->session_info;
conn->read_only = ent->read_only; conn->read_only = ent->read_only;
conn->share_access = ent->share_access; conn->share_access = ent->share_access;
conn->vuid = ent->vuid;
return(True); return(True);
} }
} }
@ -250,6 +251,7 @@ static bool check_user_ok(connection_struct *conn,
ent->share_access = share_access; ent->share_access = share_access;
free_conn_session_info_if_unused(conn); free_conn_session_info_if_unused(conn);
conn->session_info = ent->session_info; conn->session_info = ent->session_info;
conn->vuid = ent->vuid;
if (vuid == UID_FIELD_INVALID) { if (vuid == UID_FIELD_INVALID) {
/* /*
* Not strictly needed, just make it really * Not strictly needed, just make it really