[PATCH] Ensure conn->vuid is set correctly
Ralph Böhme
slow at samba.org
Thu Mar 22 07:36:13 UTC 2018
Hi!
Just stumbled over the problem that conn->vuid is never set again after being
invalidated by a SMB session reauth (smbd_smb2_reauth_generic_return ->
conn_clear_vuid_caches for SMB2).
Patch attached. Please review&push if happy. Thanks!
-slow
--
Ralph Boehme, Samba Team https://samba.org/
Samba Developer, SerNet GmbH https://sernet.de/en/samba/
GPG Key Fingerprint: FAE2 C608 8A24 2520 51C5
59E4 AA1E 9B71 2639 9E46
-------------- next part --------------
From f5ba8a523394f4b1aeaa0f1adccb7b26daa6bbe1 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Thu, 22 Mar 2018 08:03:58 +0100
Subject: [PATCH] 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 at samba.org>
---
source3/smbd/uid.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 6eb53920abf..a7186530288 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -202,6 +202,7 @@ static bool check_user_ok(connection_struct *conn,
conn->session_info = ent->session_info;
conn->read_only = ent->read_only;
conn->share_access = ent->share_access;
+ conn->vuid = vuid;
return(True);
}
}
@@ -262,6 +263,7 @@ static bool check_user_ok(connection_struct *conn,
conn->read_only = readonly_share;
conn->share_access = share_access;
+ conn->vuid = vuid;
if (admin_user) {
DEBUG(2,("check_user_ok: user %s is an admin user. "
--
2.13.6
More information about the samba-technical
mailing list