1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-14 01:57:53 +03:00
Stefan Metzmacher efd4832c2c CVE-2019-10197: smbd: split change_to_user_impersonate() out of change_to_user_internal()
This makes sure we always call chdir_current_service() even
when we still impersonated the user. Which is important
in order to run the SMB* request within the correct working directory
and only if the user has permissions to enter that directory.

It makes sure we always update conn->lastused_count
in chdir_current_service() for each request.

Note that vfs_ChDir() (called from chdir_current_service())
maintains its own cache and avoids calling SMB_VFS_CHDIR()
if possible.

It means we still avoid syscalls if we get a multiple requests
for the same session/tcon tuple.

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>

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Sep  3 09:27:22 UTC 2019 on sn-devel-184
2019-09-03 09:27:21 +00:00
..
2019-02-22 12:30:10 +01:00
2019-04-11 23:35:15 +00:00
2019-08-14 17:47:33 +00:00
2019-05-03 22:34:16 +00:00
2017-12-05 04:58:26 +01:00
2019-09-01 22:21:28 +00:00