Changeset 4467 in vbox for trunk/src/VBox
- Timestamp:
- Aug 31, 2007 11:06:43 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxService/VBoxService.cpp
r4466 r4467 299 299 /* We need to setup a security descriptor to allow other processes modify access to the seamless notification event semaphore */ 300 300 SECURITY_ATTRIBUTES SecAttr; 301 PSECURITY_DESCRIPTOR pSD;302 301 OSVERSIONINFO info; 303 302 char secDesc[SECURITY_DESCRIPTOR_MIN_LENGTH]; … … 322 321 if (dwMajorVersion >= 6) /* Vista and up only */ 323 322 { 324 PACL pSacl = NULL;325 BOOL fSaclPresent = FALSE;326 BOOL fSaclDefaulted = FALSE;327 323 HMODULE hModule; 328 324 … … 330 326 331 327 hModule = LoadLibrary("ADVAPI32.DLL"); 332 333 328 if (hModule) 334 329 { 330 PSECURITY_DESCRIPTOR pSD; 331 PACL pSacl = NULL; 332 BOOL fSaclPresent = FALSE; 333 BOOL fSaclDefaulted = FALSE; 334 335 335 *(uintptr_t *)&pfnConvertStringSecurityDescriptorToSecurityDescriptorA = (uintptr_t)GetProcAddress(hModule, "ConvertStringSecurityDescriptorToSecurityDescriptorA"); 336 336 … … 338 338 if (pfnConvertStringSecurityDescriptorToSecurityDescriptorA) 339 339 { 340 ret = pfnConvertStringSecurityDescriptorToSecurityDescriptorA("S:(ML;;NW;;;LW)", // this means "low integrity" 341 SDDL_REVISION_1, 342 &pSD, 343 NULL); 340 ret = pfnConvertStringSecurityDescriptorToSecurityDescriptorA("S:(ML;;NW;;;LW)", /* this means "low integrity" */ 341 SDDL_REVISION_1, 342 &pSD, NULL); 344 343 if (!ret) 345 344 dprintf(("ConvertStringSecurityDescriptorToSecurityDescriptorA failed with %d\n", GetLastError())); 345 346 346 ret = GetSecurityDescriptorSacl(pSD, &fSaclPresent, &pSacl, &fSaclDefaulted); 347 347 if (!ret) 348 348 dprintf(("GetSecurityDescriptorSacl failed with %d\n", GetLastError())); 349 349 350 ret = SetSecurityDescriptorSacl(SecAttr.lpSecurityDescriptor, TRUE, pSacl, FALSE); 350 351 if (!ret)
Note:
See TracChangeset
for help on using the changeset viewer.