Overview
| Artifact ID: | d6144a1416402d3392938c22642a7a3846faa681 |
|---|---|
| Ticket: | 1193497fffffffffffffffffffffffffffffffff
file writable lies for certain XP directories |
| User & Date: | jfg118 on 2006-03-18 07:08:00 |
Changes
- icomment:
Logged In: YES user_id=1266631 I found this alternative way to lookup the Everyone sid without the string representation. http://support.microsoft.com/default.aspx?scid=kb;en-us;111543 >> Add these definitions SID_IDENTIFIER_AUTHORITY userSidAuthority = SECURITY_WORLD_SID_AUTHORITY; typedef DWORD (WINAPI *getSidLengthRequiredDef) ( UCHAR ); typedef BOOL (WINAPI *initializeSidDef) ( PSID, PSID_IDENTIFIER_AUTHORITY, BYTE ); typedef PDWORD (WINAPI *getSidSubAuthorityDef) ( PSID, DWORD ); static getSidLengthRequiredDef getSidLengthRequiredProc; static initializeSidDef initializeSidProc; static getSidSubAuthorityDef getSidSubAuthorityProc; >>> Add to DLL init section getSidLengthRequiredProc = (getSidLengthRequiredDef) GetProcAddress(hInstance, "GetSidLengthRequired"); initializeSidProc = (initializeSidDef) GetProcAddress(hInstance, "InitializeSid"); getSidSubAuthorityProc = (getSidSubAuthorityDef) GetProcAddress(hInstance, "GetSidSubAuthority"); >>> Be sure to update the if check to make sure all are loaded. >>Replace the Everyone lookup /* Get the "Everyone" SID */ userSid = ckalloc(getSidLengthRequiredProc(1)); initializeSidProc( userSid, &userSidAuthority, 1); *(getSidSubAuthorityProc( userSid, 0)) = SECURITY_WORLD_RID;
- login: "jfg118"
- mimetype: "text/plain"
- username: "jfg118"