From: Ralph Boehme Date: Fri, 17 Jan 2020 13:42:22 +0000 (+0100) Subject: smbd: setting current_user stuff here is redundant X-Git-Tag: ldb-2.1.1~178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6e722abde82252b01e30691c0fe4aef579b3584;p=thirdparty%2Fsamba.git smbd: setting current_user stuff here is redundant This is already handled by set_sec_ctx() below, we just have to pass in the values instead of setting it here in this function before calling set_sec_ctx(). Signed-off-by: Ralph Boehme Reviewed-by: Andreas Schneider --- diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 9b983df80db..f425f209bb9 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -413,14 +413,10 @@ static bool change_to_user_impersonate(connection_struct *conn, } } - /*Set current_user since we will immediately also call set_sec_ctx() */ - current_user.ut.ngroups = num_groups; - current_user.ut.groups = group_list; - set_sec_ctx(uid, gid, - current_user.ut.ngroups, - current_user.ut.groups, + num_groups, + group_list, conn->session_info->security_token); current_user.conn = conn;