Location: Symbol Reference > Classes > TJwSecureFileObject Class > TJwSecureFileObject Methods > TJwSecureFileObject.SetDACL Method
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwSecureFileObject.SetDACL Method
Pascal
procedure SetDACL(const list: TJwDAccessControlList; const Protection: TJwACLProtectionState = apNone); override; overload;
Parameters 
Description 
const Protection: TJwACLProtectionState = apNone 
defines which TJwSecurityInformationFlag Flag is used:
  • apNone uses simply siDaclSecurityInformation to set DACL
  • apProtected uses siProtectedDaclSecurityInformation to set a protected DACL
  • apUnprotected uses siUnprotectedDaclSecurityInformation to set an unprotected DACL and let flow the inheritance stream
 

SetDACL sets the DACL of the file object. You need WRITE_DACL rights to set the DACL or the curren token must be the owner. 

If you want to replace an existing DACL completly, you have to first call SetDACL with a nil list-Parameter. This creates a NULL DACL (with everybody has access to it) Afterwards you can set a new DACL to the file. So nobody can hijack the file you should also open the file exclusively and do not use the SetNamedXXX methods. 

New: You can also use apProtected to remove inherited ACEs (replace an existing DACL completely). 

The list is copied into the file object. 

 

Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!