Module: wine Branch: master Commit: 524b43112371d5c5b6323a1d66fd57da98986cd2 URL: https://gitlab.winehq.org/wine/wine/-/commit/524b43112371d5c5b6323a1d66fd57d...
Author: Elizabeth Figura zfigura@codeweavers.com Date: Tue Jun 4 20:42:56 2024 -0500
server: Ignore attempts to set a mandatory label on a token.
---
server/token.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/server/token.c b/server/token.c index 4df8d2e0c6e..f23013103dd 100644 --- a/server/token.c +++ b/server/token.c @@ -134,6 +134,8 @@ struct group
static void token_dump( struct object *obj, int verbose ); static void token_destroy( struct object *obj ); +static int token_set_sd( struct object *obj, const struct security_descriptor *sd, + unsigned int set_info );
static const struct object_ops token_ops = { @@ -148,7 +150,7 @@ static const struct object_ops token_ops = no_get_fd, /* get_fd */ default_map_access, /* map_access */ default_get_sd, /* get_sd */ - default_set_sd, /* set_sd */ + token_set_sd, /* set_sd */ no_get_full_name, /* get_full_name */ no_lookup_name, /* lookup_name */ no_link_name, /* link_name */ @@ -167,6 +169,12 @@ static void token_dump( struct object *obj, int verbose ) token->token_id.low_part, token->primary, token->impersonation_level ); }
+static int token_set_sd( struct object *obj, const struct security_descriptor *sd, + unsigned int set_info ) +{ + return default_set_sd( obj, sd, set_info & ~LABEL_SECURITY_INFORMATION ); +} + void security_set_thread_token( struct thread *thread, obj_handle_t handle ) { if (!handle)