Berechtigungungen für Verzeichnisse setzen
-
Hallo!
Ich möchte die Berechtigungen für ein Verzeichnis verändern. Zum Ausprobieren habe ich ein Beispiel aus der Win32-Hilfe nachvollzogen, indem alle Berechtigungen entfernt werden. Das funktioniert auch, aber zusätzlich hat anschließend "Jeder" Vollzugriff auf das Verzeichnis. Hier ein bißchen Code:
// create an ACL with no ACEs dwRes = ::SetEntriesInAcl(0, NULL, NULL, &pDacl); if (ERROR_SUCCESS != dwRes) return dwRes; // attach the emtpy ACL as the object's DACL dwRes = SetNamedSecurityInfo(lpObjectName, ObjectType, DACL_SECURITY_INFORMATION, NULL, NULL, pDacl, NULL);Hat jemand eine Erklärung dafür?
Danke im voraus.
Rob'
-
Das wird an den parametern liegen. Guck doch einfach mal nach im PSDK oder online im MSDN.
-
Hier ein Zitat aus der Win32-Hilfe: "The first example shows how to add an empty DACL to an object's security descriptor. The effect is to deny all access to the object."
Rob'