ntdll: Implement NtQueryInformationToken(TokenSessionId).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46595 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2b5cefc92e
commit
eb69da2a9c
|
@ -418,10 +418,13 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
|||
break;
|
||||
|
||||
case TokenSessionId:
|
||||
SERVER_START_REQ( get_token_info )
|
||||
{
|
||||
*(DWORD *)info = 0;
|
||||
FIXME("QueryInformationToken( ..., TokenSessionId, ...) semi-stub\n");
|
||||
req->handle = wine_server_obj_handle( token );
|
||||
status = wine_server_call( req );
|
||||
if (!status) *(DWORD *)info = reply->session_id;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
break;
|
||||
|
||||
case TokenVirtualizationEnabled:
|
||||
|
|
|
@ -4913,12 +4913,12 @@ struct get_token_info_reply
|
|||
struct reply_header __header;
|
||||
luid_t token_id;
|
||||
luid_t modified_id;
|
||||
unsigned int session_id;
|
||||
int primary;
|
||||
int impersonation_level;
|
||||
int elevation;
|
||||
int group_count;
|
||||
int privilege_count;
|
||||
char __pad_44[4];
|
||||
};
|
||||
|
||||
|
||||
|
@ -6252,7 +6252,7 @@ union generic_reply
|
|||
|
||||
/* ### protocol_version begin ### */
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 723
|
||||
#define SERVER_PROTOCOL_VERSION 724
|
||||
|
||||
/* ### protocol_version end ### */
|
||||
|
||||
|
|
|
@ -3432,6 +3432,7 @@ struct handle_info
|
|||
@REPLY
|
||||
luid_t token_id; /* locally-unique identifier of the token */
|
||||
luid_t modified_id; /* locally-unique identifier of the modified version of the token */
|
||||
unsigned int session_id; /* token session id */
|
||||
int primary; /* is the token primary or impersonation? */
|
||||
int impersonation_level; /* level of impersonation */
|
||||
int elevation; /* elevation type */
|
||||
|
|
|
@ -2088,11 +2088,12 @@ C_ASSERT( FIELD_OFFSET(struct get_token_info_request, handle) == 12 );
|
|||
C_ASSERT( sizeof(struct get_token_info_request) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, token_id) == 8 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, modified_id) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, primary) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, impersonation_level) == 28 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, elevation) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, group_count) == 36 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, privilege_count) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, session_id) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, primary) == 28 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, impersonation_level) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, elevation) == 36 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, group_count) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_token_info_reply, privilege_count) == 44 );
|
||||
C_ASSERT( sizeof(struct get_token_info_reply) == 48 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_linked_token_request, handle) == 12 );
|
||||
C_ASSERT( sizeof(struct create_linked_token_request) == 16 );
|
||||
|
|
|
@ -1601,6 +1601,7 @@ DECL_HANDLER(get_token_info)
|
|||
{
|
||||
reply->token_id = token->token_id;
|
||||
reply->modified_id = token->modified_id;
|
||||
reply->session_id = token->session_id;
|
||||
reply->primary = token->primary;
|
||||
reply->impersonation_level = token->impersonation_level;
|
||||
reply->elevation = token->elevation;
|
||||
|
|
|
@ -4251,6 +4251,7 @@ static void dump_get_token_info_reply( const struct get_token_info_reply *req )
|
|||
{
|
||||
dump_luid( " token_id=", &req->token_id );
|
||||
dump_luid( ", modified_id=", &req->modified_id );
|
||||
fprintf( stderr, ", session_id=%08x", req->session_id );
|
||||
fprintf( stderr, ", primary=%d", req->primary );
|
||||
fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
|
||||
fprintf( stderr, ", elevation=%d", req->elevation );
|
||||
|
|
Loading…
Reference in New Issue