How to create a Empty ACL Record ?
From: Aboo Valappil (anonymous_at_discussions.microsoft.com)
Date: 05/09/04
- Previous message: Aboo Valappil: "Can not get SE_BACKUP_NAME working !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 9 May 2004 02:35:00 -0700
Hi All,
Please help me with this ...
I want to empty the ACLs of a file which means no access
to anyone except the owner.
I used the following .... But it always create a non
existent ACL which is access to everyone ! How do make the
acl empty ?
AclCount = 0 ;
Ea = new EXPLICIT_ACCESS[AceCount];
if (SetEntriesInAcl(AceCount, Ea, NULL, &pACL) !=
ERROR_SUCCESS ) {
printf("%s\n",ErrorMessage(GetLastError()));
RetVal=13;
goto cleanup;
}
if ( SetSecurityDescriptorDacl(pSD, TRUE, pACL,
FALSE ) == 0 ) {
printf("%s\n",ErrorMessage(GetLastError()));
RetVal=14;
goto cleanup;
}
if (SetFileSecurity
NewFileName,DACL_SECURITY_INFORMATION,pSD) == 0 ) {
printf("%s\n",ErrorMessage(GetLastError()));
RetVal=15;
goto cleanup;
}
- Previous message: Aboo Valappil: "Can not get SE_BACKUP_NAME working !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|