CVE-2019-10197: smbd: make sure that change_to_user_internal() always resets current_...
commitfd0d3986bba5ce9fee3df5dbba26a593e1274680
authorStefan Metzmacher <metze@samba.org>
Thu, 11 Jul 2019 15:01:29 +0000 (11 17:01 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 27 Aug 2019 11:16:24 +0000 (27 13:16 +0200)
tree9423dcedbce9e98d9c95da9b8205617c51cbb173
parentcf67b48f779807ccebde6f7c86f4330063f705eb
CVE-2019-10197: smbd: make sure that change_to_user_internal() always resets current_user.done_chdir

We should not leave current_user.done_chdir as true if we didn't call
chdir_current_service() with success.

This caused problems in when calling vfs_ChDir() in pop_conn_ctx() when
chdir_current_service() worked once on one share but later failed on another
share.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14035

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/uid.c