From 15699475d6031dd0ed5cd24e9915c574b35a233b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 16 Jul 2019 14:06:09 +0200 Subject: [PATCH] smbd: remove directory changing from become_user*() This was the behavior in versions before 4.9 and it is hopefully not required by current callers of become_user*(). Pair-Programmed-With: Ralph Boehme Signed-off-by: Stefan Metzmacher Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/smbd/uid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 5b0afcb1e9a..106f1430011 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -686,7 +686,7 @@ bool become_user(connection_struct *conn, uint64_t vuid) push_conn_ctx(); - ok = change_to_user_internal(conn, vuser->session_info, vuid); + ok = change_to_user_impersonate(conn, vuser->session_info, vuid); if (!ok) { pop_sec_ctx(); pop_conn_ctx(); @@ -716,7 +716,7 @@ bool become_user_by_session(connection_struct *conn, push_conn_ctx(); - ok = change_to_user_internal(conn, session_info, UID_FIELD_INVALID); + ok = change_to_user_impersonate(conn, session_info, UID_FIELD_INVALID); if (!ok) { pop_sec_ctx(); pop_conn_ctx(); -- 2.47.3