- Timestamp:
- Dec 19, 1999, 1:25:55 PM (26 years ago)
- Location:
- trunk/src/NTDLL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/NTDLL/ntdll.def
r1926 r2134 1 ; $Id: ntdll.def,v 1.2 8 1999-12-01 18:39:49sandervl Exp $1 ; $Id: ntdll.def,v 1.29 1999-12-19 12:25:55 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 212 212 RtlConvertSidToUnicodeString = _RtlConvertSidToUnicodeString@12 @296 213 213 RtlEqualSid = _RtlEqualSid@8 @352 214 RtlEqualPrefixSid = _RtlEqualPrefixSid@8 @351 214 215 RtlFreeSid = _RtlFreeSid@4 @376 216 RtlValidSid = _RtlValidSid@4 @523 215 217 RtlLengthRequiredSid = _RtlLengthRequiredSid@4 @427 216 218 RtlLengthSid = _RtlLengthSid@4 @429 … … 218 220 RtlSubAuthoritySid = _RtlSubAuthoritySid@8 @497 219 221 RtlSubAuthorityCountSid = _RtlSubAuthorityCountSid@4 @496 222 RtlIdentifierAuthoritySid = _RtlIdentifierAuthoritySid@4 @395 220 223 RtlCopySid = _RtlCopySid@12 @302 221 224 RtlCreateSecurityDescriptor = _RtlCreateSecurityDescriptor@8 @313 -
trunk/src/NTDLL/ntdll.h
r2128 r2134 1 /* $Id: ntdll.h,v 1. 9 1999-12-18 21:45:13sandervl Exp $ */1 /* $Id: ntdll.h,v 1.10 1999-12-19 12:25:55 sandervl Exp $ */ 2 2 3 3 /* … … 384 384 385 385 BOOL WINAPI RtlEqualSid(PSID pSid1, PSID pSid2); 386 BOOL WINAPI RtlEqualPrefixSid (PSID pSid1, PSID pSid2); 387 BOOL WINAPI RtlValidSid( PSID pSid ); 386 388 VOID* WINAPI RtlFreeSid(PSID pSid); 387 389 DWORD WINAPI RtlLengthRequiredSid(DWORD nrofsubauths); … … 390 392 LPDWORD WINAPI RtlSubAuthoritySid(PSID PSID,DWORD nr); 391 393 LPBYTE WINAPI RtlSubAuthorityCountSid(PSID PSID); 394 PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid( PSID pSid ); 392 395 DWORD WINAPI RtlCopySid(DWORD len,PSID to,PSID from); 393 396 -
trunk/src/NTDLL/ntdllexp.def
r1899 r2134 6 6 RtlUnwindAsm @590 7 7 _RtlZeroMemory@8 @591 8 _RtlLargeIntegerToChar@1 2@4258 _RtlLargeIntegerToChar@16 @425 9 9 _NtAlertThread@8 @57 10 10 _ZwAlertThread@8 @700 … … 153 153 _RtlConvertSidToUnicodeString@12 @296 154 154 _RtlEqualSid@8 @352 155 _RtlEqualPrefixSid@8 @351 155 156 _RtlFreeSid@4 @376 157 _RtlValidSid@4 @523 156 158 _RtlLengthRequiredSid@4 @427 157 159 _RtlLengthSid@4 @429 … … 159 161 _RtlSubAuthoritySid@8 @497 160 162 _RtlSubAuthorityCountSid@4 @496 163 _RtlIdentifierAuthoritySid@4 @395 161 164 _RtlCopySid@12 @302 162 165 _RtlCreateSecurityDescriptor@8 @313 … … 228 231 _RtlConvertLongToLargeInteger@4 @316 229 232 _RtlConvertUlongToLargeInteger@4 @320 230 _chkstk @946231 DbgBreakPoint @20232 DbgUserBreakPoint @28233 _DbgPrint @21 -
trunk/src/NTDLL/sec.cpp
r2122 r2134 1 /* $Id: sec.cpp,v 1. 4 1999-12-18 20:01:14sandervl Exp $ */1 /* $Id: sec.cpp,v 1.5 1999-12-19 12:25:55 sandervl Exp $ */ 2 2 3 3 /* … … 21 21 #include <os2win.h> 22 22 #include "ntdll.h" 23 24 /*25 #include "windef.h"26 #include "winbase.h"27 #include "winuser.h"28 #include "wine/winestring.h"29 #include "heap.h"30 #include "winnls.h"31 #include "winuser.h"32 #include "winerror.h"33 #include "stackframe.h"34 35 #include "winreg.h"36 */37 23 38 24 /* … … 77 63 (*pSid)->Revision = SID_REVISION; 78 64 (*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)); 65 66 if (nSubAuthorityCount > 0) 67 (*pSid)->SubAuthority[0] = nSubAuthority0; 68 if (nSubAuthorityCount > 1) 69 (*pSid)->SubAuthority[1] = nSubAuthority1; 70 if (nSubAuthorityCount > 2) 71 (*pSid)->SubAuthority[2] = nSubAuthority2; 72 if (nSubAuthorityCount > 3) 73 (*pSid)->SubAuthority[3] = nSubAuthority3; 74 if (nSubAuthorityCount > 4) 75 (*pSid)->SubAuthority[4] = nSubAuthority4; 76 if (nSubAuthorityCount > 5) 77 (*pSid)->SubAuthority[5] = nSubAuthority5; 78 if (nSubAuthorityCount > 6) 79 (*pSid)->SubAuthority[6] = nSubAuthority6; 80 if (nSubAuthorityCount > 7) 81 (*pSid)->SubAuthority[7] = nSubAuthority7; 82 83 if(pIdentifierAuthority) 84 memcpy((PVOID)&(*pSid)->IdentifierAuthority, (PVOID)pIdentifierAuthority, sizeof(SID_IDENTIFIER_AUTHORITY)); 88 85 return TRUE; 89 86 } … … 96 93 BOOL WINAPI RtlEqualSid(PSID pSid1, PSID pSid2) 97 94 { 98 dprintf(("NTDLL: RtlEqualSid(%08x, %08x) not implemented.\n", 99 pSid1, 100 pSid2)); 101 102 return TRUE; 103 } 104 95 dprintf(("NTDLL: RtlEqualSid(%08x, %08x)", 96 pSid1, 97 pSid2)); 98 99 if (!RtlValidSid(pSid1) || !RtlValidSid(pSid2)) 100 return FALSE; 101 102 if (*RtlSubAuthorityCountSid(pSid1) != *RtlSubAuthorityCountSid(pSid2)) 103 return FALSE; 104 105 if (memcmp(pSid1, pSid2, RtlLengthSid(pSid1)) != 0) 106 return FALSE; 107 108 return TRUE; 109 } 110 111 112 /****************************************************************************** 113 * RtlEqualPrefixSid [NTDLL.351] 114 */ 115 BOOL WINAPI RtlEqualPrefixSid (PSID pSid1, PSID pSid2) 116 { 117 if (!RtlValidSid(pSid1) || !RtlValidSid(pSid2)) 118 return FALSE; 119 120 if (*RtlSubAuthorityCountSid(pSid1) != *RtlSubAuthorityCountSid(pSid2)) 121 return FALSE; 122 123 if (memcmp(pSid1, pSid2, RtlLengthRequiredSid(pSid1->SubAuthorityCount - 1)) != 0) 124 return FALSE; 125 126 return TRUE; 127 } 105 128 106 129 /****************************************************************************** … … 109 132 VOID* WINAPI RtlFreeSid(PSID pSid) 110 133 { 111 dprintf(("NTDLL: RtlFreeSid(%08xh) not implemented.\n", 112 pSid)); 134 dprintf(("NTDLL: RtlFreeSid(%08xh)", pSid)); 113 135 114 136 Heap_Free(pSid); 115 return (VOID*)TRUE; //??????137 return NULL; 116 138 } 117 139 … … 171 193 172 194 195 /****************************************************************************** 196 * RtlIdentifierAuthoritySid [NTDLL.395] 197 * 198 * PARAMS 199 * pSid [] 200 */ 201 PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid( PSID pSid ) 202 { 203 return &pSid->IdentifierAuthority; 204 } 205 173 206 /************************************************************************** 174 207 * RtlSubAuthoritySid [NTDLL.497] … … 191 224 LPBYTE WINAPI RtlSubAuthorityCountSid(PSID psid) 192 225 { 193 dprintf (("NTDLL: RtlSubAUthorityCountSid(%08xh)\n",194 psid));226 dprintf2(("NTDLL: RtlSubAUthorityCountSid(%08xh)\n", 227 psid)); 195 228 196 229 return ((LPBYTE)psid)+1; … … 201 234 * RtlCopySid [NTDLL.302] 202 235 */ 203 DWORD WINAPI RtlCopySid(DWORD len,204 PSID to,205 PSID from)236 DWORD WINAPI RtlCopySid(DWORD nDestinationSidLength, 237 PSID pDestinationSid, 238 PSID pSourceSid) 206 239 { 207 240 dprintf(("NTDLL: RtlCopySid(%08xh,%08xh,%08xh)\n", 208 len, 209 to, 210 from)); 211 212 if (!from) 213 return 0; 214 215 if (len<(from->SubAuthorityCount*4+8)) 216 return STATUS_BUFFER_TOO_SMALL; 217 218 memmove(to, 219 from, 220 from->SubAuthorityCount*4+8); 221 222 return STATUS_SUCCESS; 223 } 224 241 nDestinationSidLength, 242 pDestinationSid, 243 pSourceSid)); 244 245 if (!RtlValidSid(pSourceSid)) 246 return STATUS_INVALID_PARAMETER; 247 248 if (nDestinationSidLength < RtlLengthSid(pSourceSid)) 249 return STATUS_BUFFER_TOO_SMALL; 250 251 memcpy(pDestinationSid, pSourceSid, RtlLengthSid(pSourceSid)); 252 253 return STATUS_SUCCESS; 254 } 255 256 257 /****************************************************************************** 258 * RtlValidSid [NTDLL.523] 259 * 260 * PARAMS 261 * pSid [] 262 */ 263 BOOL WINAPI RtlValidSid( PSID pSid ) 264 { 265 if (IsBadReadPtr(pSid, 4)) 266 { 267 return FALSE; 268 } 269 270 if (pSid->SubAuthorityCount > SID_MAX_SUB_AUTHORITIES) 271 return FALSE; 272 273 if (!pSid || pSid->Revision != SID_REVISION) 274 return FALSE; 275 276 return TRUE; 277 } 225 278 226 279 /*
Note:
See TracChangeset
for help on using the changeset viewer.