Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
978f4706
Commit
978f4706
authored
Jan 12, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: NtQueryInformationToken change parameters according to PSDK.
Check for NULL pointer.
parent
a8d1e6e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
nt.c
dlls/ntdll/nt.c
+12
-11
winternl.h
include/winternl.h
+1
-1
No files found.
dlls/ntdll/nt.c
View file @
978f4706
...
...
@@ -189,15 +189,15 @@ NTSTATUS WINAPI NtAdjustPrivilegesToken(
*/
NTSTATUS
WINAPI
NtQueryInformationToken
(
HANDLE
token
,
DWORD
tokeninfoclass
,
L
PVOID
tokeninfo
,
DWORD
tokeninfolength
,
LPDWORD
retlen
)
TOKEN_INFORMATION_CLASS
tokeninfoclass
,
PVOID
tokeninfo
,
ULONG
tokeninfolength
,
PULONG
retlen
)
{
unsigned
int
len
=
0
;
ULONG
len
;
NTSTATUS
status
=
STATUS_SUCCESS
;
TRACE
(
"(%p,%
l
d,%p,%ld,%p)
\n
"
,
TRACE
(
"(%p,%d,%p,%ld,%p)
\n
"
,
token
,
tokeninfoclass
,
tokeninfo
,
tokeninfolength
,
retlen
);
switch
(
tokeninfoclass
)
...
...
@@ -224,10 +224,11 @@ NTSTATUS WINAPI NtQueryInformationToken(
case TokenImpersonationLevel:
case TokenStatistics:
#endif /* 0 */
default:
len
=
0
;
}
/* FIXME: what if retlen == NULL ? */
*
retlen
=
len
;
if
(
retlen
)
*
retlen
=
len
;
if
(
tokeninfolength
<
len
)
return
STATUS_BUFFER_TOO_SMALL
;
...
...
@@ -244,7 +245,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
req
->
handle
=
token
;
wine_server_set_reply
(
req
,
sid
,
sid_len
);
status
=
wine_server_call
(
req
);
*
retlen
=
reply
->
user_len
+
sizeof
(
TOKEN_USER
);
if
(
retlen
)
*
retlen
=
reply
->
user_len
+
sizeof
(
TOKEN_USER
);
if
(
status
==
STATUS_SUCCESS
)
{
tuser
->
User
.
Sid
=
sid
;
...
...
@@ -291,7 +292,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
if
(
tpriv
&&
tokeninfolength
>
FIELD_OFFSET
(
TOKEN_PRIVILEGES
,
Privileges
))
wine_server_set_reply
(
req
,
&
tpriv
->
Privileges
,
tokeninfolength
-
FIELD_OFFSET
(
TOKEN_PRIVILEGES
,
Privileges
)
);
status
=
wine_server_call
(
req
);
*
retlen
=
FIELD_OFFSET
(
TOKEN_PRIVILEGES
,
Privileges
)
+
reply
->
len
;
if
(
retlen
)
*
retlen
=
FIELD_OFFSET
(
TOKEN_PRIVILEGES
,
Privileges
)
+
reply
->
len
;
if
(
tpriv
)
tpriv
->
PrivilegeCount
=
reply
->
len
/
sizeof
(
LUID_AND_ATTRIBUTES
);
}
SERVER_END_REQ
;
...
...
@@ -309,7 +310,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
break
;
default:
{
ERR
(
"Unhandled Token Information class %
l
d!
\n
"
,
tokeninfoclass
);
ERR
(
"Unhandled Token Information class %d!
\n
"
,
tokeninfoclass
);
return
STATUS_NOT_IMPLEMENTED
;
}
}
...
...
include/winternl.h
View file @
978f4706
...
...
@@ -1819,7 +1819,7 @@ NTSTATUS WINAPI NtQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_
NTSTATUS
WINAPI
NtQueryInformationPort
(
HANDLE
,
PORT_INFORMATION_CLASS
,
PVOID
,
ULONG
,
PULONG
);
NTSTATUS
WINAPI
NtQueryInformationProcess
(
HANDLE
,
PROCESSINFOCLASS
,
PVOID
,
ULONG
,
PULONG
);
NTSTATUS
WINAPI
NtQueryInformationThread
(
HANDLE
,
THREADINFOCLASS
,
PVOID
,
ULONG
,
PULONG
);
NTSTATUS
WINAPI
NtQueryInformationToken
(
HANDLE
,
DWORD
,
LPVOID
,
DWORD
,
LPDWORD
);
NTSTATUS
WINAPI
NtQueryInformationToken
(
HANDLE
,
TOKEN_INFORMATION_CLASS
,
PVOID
,
ULONG
,
PULONG
);
NTSTATUS
WINAPI
NtQueryInstallUILanguage
(
LANGID
*
);
NTSTATUS
WINAPI
NtQueryIntervalProfile
(
KPROFILE_SOURCE
,
PULONG
);
NTSTATUS
WINAPI
NtQueryIoCompletion
(
HANDLE
,
IO_COMPLETION_INFORMATION_CLASS
,
PVOID
,
ULONG
,
PULONG
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment