Module: wine Branch: master Commit: f68659c6e878070a0d9f7bc94f1f3c6fe07a2990 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f68659c6e878070a0d9f7bc94...
Author: Michael Müller michael@fds-team.de Date: Sat Feb 6 18:26:59 2021 -0600
server: Grant the same access rights when req->access is zero in duplicate_token.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
server/token.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/token.c b/server/token.c index ec2616098c6..2ae1cb1780a 100644 --- a/server/token.c +++ b/server/token.c @@ -1358,7 +1358,8 @@ DECL_HANDLER(duplicate_token) struct token *token = token_duplicate( src_token, req->primary, req->impersonation_level, sd, NULL, 0, NULL, 0 ); if (token) { - reply->new_handle = alloc_handle_no_access_check( current->process, token, req->access, objattr->attributes ); + unsigned int access = req->access ? req->access : get_handle_access( current->process, req->handle ); + reply->new_handle = alloc_handle_no_access_check( current->process, token, access, objattr->attributes ); release_object( token ); } release_object( src_token );