- Timestamp:
- Dec 18, 1999, 9:01:14 PM (26 years ago)
- Location:
- trunk/src/NTDLL
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/NTDLL/initterm.cpp
r951 r2122 1 /* $Id: initterm.cpp,v 1. 7 1999-09-15 23:26:05sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.8 1999-12-18 20:01:13 sandervl Exp $ */ 2 2 3 3 /* … … 50 50 51 51 52 BOOL WINAPI NTDLL_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); 53 52 54 /****************************************************************************/ 53 55 /* _DLL_InitTerm is the function that gets called by the operating system */ … … 81 83 /*******************************************************************/ 82 84 83 if(RegisterLxDll(hModule, 0, 0) == FALSE)85 if(RegisterLxDll(hModule, NTDLL_LibMain, 0) == FALSE) 84 86 return 0UL; 85 87 -
trunk/src/NTDLL/nt.cpp
r97 r2122 1 /* $Id: nt.cpp,v 1. 2 1999-06-10 17:06:45 phallerExp $ */1 /* $Id: nt.cpp,v 1.3 1999-12-18 20:01:13 sandervl Exp $ */ 2 2 3 3 … … 331 331 { 332 332 case TokenGroups: /* 2 */ 333 *ReturnLength = sizeof (TOKEN_GROUPS); 333 *ReturnLength = sizeof (TOKEN_GROUPS); 334 if(TokenInformationLength < sizeof (TOKEN_GROUPS)) { 335 return STATUS_BUFFER_TOO_SMALL; 336 } 337 memset(TokenInformation, 0, sizeof(TOKEN_GROUPS)); 338 break; 339 case TokenUser: /* 1 */ 340 *ReturnLength = sizeof (TOKEN_USER); 341 if(TokenInformationLength < sizeof (TOKEN_USER)) { 342 return STATUS_BUFFER_TOO_SMALL; 343 } 344 memset(TokenInformation, 0, sizeof(TOKEN_USER)); 345 break; 346 case TokenPrivileges: 347 *ReturnLength = sizeof (TOKEN_PRIVILEGES); 348 if(TokenInformationLength < sizeof (TOKEN_PRIVILEGES)) { 349 return STATUS_BUFFER_TOO_SMALL; 350 } 351 memset(TokenInformation, 0, sizeof(TOKEN_PRIVILEGES)); 352 break; 353 case TokenOwner: 354 *ReturnLength = sizeof (TOKEN_OWNER); 355 if(TokenInformationLength < sizeof (TOKEN_OWNER)) { 356 return STATUS_BUFFER_TOO_SMALL; 357 } 358 memset(TokenInformation, 0, sizeof(TOKEN_OWNER)); 359 break; 360 case TokenPrimaryGroup: 361 *ReturnLength = sizeof (TOKEN_PRIMARY_GROUP); 362 if(TokenInformationLength < sizeof (TOKEN_PRIMARY_GROUP)) { 363 return STATUS_BUFFER_TOO_SMALL; 364 } 365 memset(TokenInformation, 0, sizeof(TOKEN_PRIMARY_GROUP)); 366 break; 367 case TokenDefaultDacl: 368 *ReturnLength = sizeof (TOKEN_DEFAULT_DACL); 369 if(TokenInformationLength < sizeof (TOKEN_DEFAULT_DACL)) { 370 return STATUS_BUFFER_TOO_SMALL; 371 } 372 memset(TokenInformation, 0, sizeof(TOKEN_DEFAULT_DACL)); 373 break; 374 case TokenSource: 375 *ReturnLength = sizeof (TOKEN_SOURCE); 376 if(TokenInformationLength < sizeof (TOKEN_SOURCE)) { 377 return STATUS_BUFFER_TOO_SMALL; 378 } 379 memset(TokenInformation, 0, sizeof(TOKEN_SOURCE)); 380 break; 381 case TokenType: 382 *ReturnLength = sizeof (TOKEN_TYPE); 383 if(TokenInformationLength < sizeof (TOKEN_TYPE)) { 384 return STATUS_BUFFER_TOO_SMALL; 385 } 386 memset(TokenInformation, 0, sizeof(TOKEN_TYPE)); 387 break; 334 388 #if 0 335 case TokenUser: /* 1 */336 case TokenPrivileges:337 case TokenOwner:338 case TokenPrimaryGroup:339 case TokenDefaultDacl:340 case TokenSource:341 case TokenType:342 389 case TokenImpersonationLevel: 343 390 case TokenStatistics: … … 345 392 } 346 393 347 return 0;394 return STATUS_SUCCESS; 348 395 } 349 396 -
trunk/src/NTDLL/ntdll.cpp
r1653 r2122 1 /* $Id: ntdll.cpp,v 1. 3 1999-11-09 09:30:20 phallerExp $ */1 /* $Id: ntdll.cpp,v 1.4 1999-12-18 20:01:14 sandervl Exp $ */ 2 2 3 3 /* … … 50 50 #define NTSTATUS DWORD 51 51 52 //SvL: per process heap for NTDLL 53 HANDLE NTDLL_hHeap = 0; 52 54 53 55 /***************************************************************************** … … 77 79 //@@@PH raise debug exception if running in debugger 78 80 } 81 82 83 BOOL WINAPI NTDLL_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 84 { 85 dprintf(("NTDLL_LibMain: 0x%x 0x%lx %p\n", hinstDLL, fdwReason, lpvReserved)); 86 87 switch (fdwReason) { 88 case DLL_PROCESS_ATTACH: 89 NTDLL_hHeap = HeapCreate(0, 0x10000, 0); 90 break; 91 case DLL_PROCESS_DETACH: 92 HeapDestroy(NTDLL_hHeap); 93 NTDLL_hHeap = 0; 94 break; 95 case DLL_THREAD_ATTACH: 96 break; 97 case DLL_THREAD_DETACH: 98 break; 99 default: 100 break; 101 } 102 return TRUE; 103 } 104 -
trunk/src/NTDLL/ntdll.h
r638 r2122 1 /* $Id: ntdll.h,v 1. 7 1999-08-22 22:45:52sandervl Exp $ */1 /* $Id: ntdll.h,v 1.8 1999-12-18 20:01:14 sandervl Exp $ */ 2 2 3 3 /* … … 45 45 46 46 47 //SvL: Internal heap allocation definitions for NTDLL 48 extern HANDLE NTDLL_hHeap; 49 #define Heap_Alloc(a) HeapAlloc(NTDLL_hHeap, HEAP_ZERO_MEMORY, a) 50 #define Heap_Free(a) HeapFree(NTDLL_hHeap, 0, (PVOID)a) 47 51 48 52 typedef struct _IO_STATUS_BLOCK … … 367 371 */ 368 372 369 BOOLEAN WINAPI RtlAllocateAndInitializeSid ( 370 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, 371 DWORD nSubAuthorityCount, 372 DWORD x3, 373 DWORD x4, 374 DWORD x5, 375 DWORD x6, 376 DWORD x7, 377 DWORD x8, 378 DWORD x9, 379 DWORD x10, 380 PSID pSid); 381 382 DWORD WINAPI RtlEqualSid(DWORD x1,DWORD x2); 383 DWORD WINAPI RtlFreeSid(DWORD x1); 373 BOOLEAN WINAPI RtlAllocateAndInitializeSid ( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, 374 BYTE nSubAuthorityCount, 375 DWORD nSubAuthority0, 376 DWORD nSubAuthority1, 377 DWORD nSubAuthority2, 378 DWORD nSubAuthority3, 379 DWORD nSubAuthority4, 380 DWORD nSubAuthority5, 381 DWORD nSubAuthority6, 382 DWORD nSubAuthority7, 383 PSID *pSid); 384 385 BOOL WINAPI RtlEqualSid(PSID pSid1, PSID pSid2); 386 VOID* WINAPI RtlFreeSid(PSID pSid); 384 387 DWORD WINAPI RtlLengthRequiredSid(DWORD nrofsubauths); 385 388 DWORD WINAPI RtlLengthSid(PSID sid); -
trunk/src/NTDLL/sec.cpp
r278 r2122 1 /* $Id: sec.cpp,v 1. 3 1999-07-06 15:48:45 phallerExp $ */1 /* $Id: sec.cpp,v 1.4 1999-12-18 20:01:14 sandervl Exp $ */ 2 2 3 3 /* … … 44 44 * 45 45 */ 46 BOOLEAN WINAPI RtlAllocateAndInitializeSid ( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,47 DWORDnSubAuthorityCount,48 DWORD x3,49 DWORD x4,50 DWORD x5,51 DWORD x6,52 DWORD x7,53 DWORD x8,54 DWORD x9,55 DWORD x10,56 PSIDpSid)46 BOOLEAN WINAPI RtlAllocateAndInitializeSid ( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, 47 BYTE nSubAuthorityCount, 48 DWORD nSubAuthority0, 49 DWORD nSubAuthority1, 50 DWORD nSubAuthority2, 51 DWORD nSubAuthority3, 52 DWORD nSubAuthority4, 53 DWORD nSubAuthority5, 54 DWORD nSubAuthority6, 55 DWORD nSubAuthority7, 56 PSID *pSid) 57 57 { 58 58 dprintf(("NTDLL: RtlAllocateAndInitializeSid(%08xh,%08xh,%08xh," … … 60 60 pIdentifierAuthority, 61 61 nSubAuthorityCount, 62 x3,63 x4,64 x5,65 x6,66 x7,67 x8,68 x9,69 x10,62 nSubAuthority0, 63 nSubAuthority1, 64 nSubAuthority2, 65 nSubAuthority3, 66 nSubAuthority4, 67 nSubAuthority5, 68 nSubAuthority6, 69 nSubAuthority7, 70 70 pSid)); 71 71 72 return 0; 72 *pSid = (PSID)Heap_Alloc(sizeof(SID)+nSubAuthorityCount*sizeof(DWORD)); 73 if(*pSid == NULL) { 74 SetLastError(ERROR_NOT_ENOUGH_MEMORY); 75 return FALSE; 76 } 77 (*pSid)->Revision = SID_REVISION; 78 (*pSid)->SubAuthorityCount = nSubAuthorityCount; 79 (*pSid)->SubAuthority[0] = nSubAuthority0; 80 (*pSid)->SubAuthority[1] = nSubAuthority1; 81 (*pSid)->SubAuthority[2] = nSubAuthority2; 82 (*pSid)->SubAuthority[3] = nSubAuthority3; 83 (*pSid)->SubAuthority[4] = nSubAuthority4; 84 (*pSid)->SubAuthority[5] = nSubAuthority5; 85 (*pSid)->SubAuthority[6] = nSubAuthority6; 86 (*pSid)->SubAuthority[7] = nSubAuthority7; 87 memcpy((PVOID)&(*pSid)->IdentifierAuthority, (PVOID)pIdentifierAuthority, sizeof(SID_IDENTIFIER_AUTHORITY)); 88 return TRUE; 73 89 } 74 90 … … 78 94 * 79 95 */ 80 DWORD WINAPI RtlEqualSid(DWORD x1, 81 DWORD x2) 96 BOOL WINAPI RtlEqualSid(PSID pSid1, PSID pSid2) 82 97 { 83 98 dprintf(("NTDLL: RtlEqualSid(%08x, %08x) not implemented.\n", 84 x1,85 x2));99 pSid1, 100 pSid2)); 86 101 87 102 return TRUE; … … 92 107 * RtlFreeSid [NTDLL.376] 93 108 */ 94 DWORD WINAPI RtlFreeSid(DWORD x1)109 VOID* WINAPI RtlFreeSid(PSID pSid) 95 110 { 96 111 dprintf(("NTDLL: RtlFreeSid(%08xh) not implemented.\n", 97 x1)); 98 99 return TRUE; 112 pSid)); 113 114 Heap_Free(pSid); 115 return (VOID*)TRUE; //?????? 100 116 } 101 117
Note:
See TracChangeset
for help on using the changeset viewer.