[PATCH] server: Use all group attributes in create_token.

Alexandre Julliard julliard at winehq.org
Mon May 6 07:29:36 CDT 2019


Vijay Kiran Kamuju <infyquest at gmail.com> writes:

> @@ -584,13 +584,13 @@ static struct token *create_token( unsigned primary, const SID *user,
>                  return NULL;
>              }
>              memcpy( &group->sid, groups[i].Sid, security_sid_len( groups[i].Sid ));
> -            group->enabled = TRUE;
> -            group->def = TRUE;
> -            group->logon = (groups[i].Attributes & SE_GROUP_LOGON_ID) != 0;
>              group->mandatory = (groups[i].Attributes & SE_GROUP_MANDATORY) != 0;
> -            group->owner = (groups[i].Attributes & SE_GROUP_OWNER) != 0;
> -            group->resource = FALSE;
> -            group->deny_only = FALSE;
> +            group->def       = (groups[i].Attributes & SE_GROUP_ENABLED_BY_DEFAULT) != 0;
> +            group->enabled   = (groups[i].Attributes & SE_GROUP_ENABLED) != 0;
> +            group->owner     = (groups[i].Attributes & SE_GROUP_OWNER) != 0;
> +            group->deny_only = (groups[i].Attributes & SE_GROUP_USE_FOR_DENY_ONLY) != 0;
> +            group->logon     = (groups[i].Attributes & SE_GROUP_LOGON_ID) != 0;
> +            group->resource  = (groups[i].Attributes & SE_GROUP_RESOURCE) != 0;

I'd suggest storing the attributes bitmask directly instead.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list