Changeset 2128 for trunk/src/NTDLL/nt.cpp
- Timestamp:
- Dec 18, 1999, 10:45:13 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/NTDLL/nt.cpp
r2122 r2128 1 /* $Id: nt.cpp,v 1. 3 1999-12-18 20:01:13 sandervl Exp $ */1 /* $Id: nt.cpp,v 1.4 1999-12-18 21:45:13 sandervl Exp $ */ 2 2 3 3 … … 15 15 #include <string.h> 16 16 #include <time.h> 17 #include <os2win.h> 18 #include <handlemanager.h> 17 19 18 20 #include "ntdll.h" … … 258 260 PHANDLE TokenHandle) 259 261 { 260 dprintf(("NTDLL: NtOpenProcessToken(%08xh,%08xh,%08xh) not implemented.\n",262 dprintf(("NTDLL: NtOpenProcessToken(%08xh,%08xh,%08xh) not correctly implemented.\n", 261 263 ProcessHandle, 262 264 DesiredAccess, 263 265 TokenHandle)); 264 266 265 *TokenHandle = 0xcafe; 266 return 0; 267 if(ProcessHandle == GetCurrentProcess()) { 268 HMOpenProcessToken(ProcessHandle, DesiredAccess, (ULONG)&ProcSecInfo, TokenHandle); 269 return STATUS_SUCCESS; 270 } 271 *TokenHandle = 0; 272 return ERROR_INVALID_HANDLE; 267 273 } 268 274 … … 282 288 TokenHandle)); 283 289 284 *TokenHandle = 0 xcafe;285 return 0;290 *TokenHandle = 0; 291 return ERROR_INVALID_HANDLE; 286 292 } 287 293 … … 321 327 LPDWORD ReturnLength) 322 328 { 323 dprintf(("NTDLL: NtQueryInformationToken(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n", 329 PROCESSTHREAD_SECURITYINFO *pSecInfo; 330 331 dprintf(("NTDLL: NtQueryInformationToken(%08xh,%08xh,%08xh,%08xh,%08xh) not correctly implemented.\n", 324 332 Token, 325 333 TokenInformationClass, … … 328 336 ReturnLength)); 329 337 338 pSecInfo = (PROCESSTHREAD_SECURITYINFO*)HMHandleGetUserData(Token); 339 if((ULONG)pSecInfo == -1) { 340 return ERROR_INVALID_HANDLE; 341 } 330 342 switch (TokenInformationClass) 331 343 { … … 335 347 return STATUS_BUFFER_TOO_SMALL; 336 348 } 337 mem set(TokenInformation, 0, sizeof(TOKEN_GROUPS));349 memcpy(TokenInformation, (LPVOID)pSecInfo->pTokenGroups, sizeof(TOKEN_GROUPS)); 338 350 break; 339 351 case TokenUser: /* 1 */
Note:
See TracChangeset
for help on using the changeset viewer.