Re: server: Retrieve the groups for a token from the server
Robert Shearman <rob(a)codeweavers.com> writes:
+tryagain: + SERVER_START_REQ( get_token_groups ) { - TOKEN_GROUPS *tgroups = tokeninfo; - SID_IDENTIFIER_AUTHORITY sid = {SECURITY_NT_AUTHORITY}; + TOKEN_GROUPS *groups = tokeninfo;
- /* we need to show admin privileges ! */ - tgroups->GroupCount = 1; - tgroups->Groups->Attributes = SE_GROUP_ENABLED; - RtlAllocateAndInitializeSid( &sid, - 2, - SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, - 0, 0, 0, 0, 0, 0, - &(tgroups->Groups->Sid)); + req->handle = token; + wine_server_set_reply( req, buffer, server_buf_len ); + status = wine_server_call( req ); + if (status == STATUS_BUFFER_TOO_SMALL) + { + if (buffer == stack_buffer) + buffer = RtlAllocateHeap(GetProcessHeap(), 0, reply->user_len); + else + buffer = RtlReAllocateHeap(GetProcessHeap(), 0, buffer, reply->user_len); + if (!buffer) return STATUS_NO_MEMORY; + + server_buf_len = reply->user_len; + goto tryagain;
You shouldn't return or goto out of a SERVER_START_REQ block. SERVER_END_REQ currently doesn't do much, but that could change. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard