From: Stefan Metzmacher Date: Tue, 16 Jul 2019 12:06:09 +0000 (+0200) Subject: smbd: remove directory changing from become_user*() X-Git-Tag: talloc-2.3.1~860 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15699475d6031dd0ed5cd24e9915c574b35a233b;p=thirdparty%2Fsamba.git 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 --- 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();