API Reference
FileAclControl
Evaluates file or directory DACL against a set of required ACEs. Desired format is a list of entries "Principal|Rights|Allow|Inheritance" where Principal can be name or SID, Rights is a FileSystemRights token (e.g., FullControl, ReadAndExecute), Allow is optional (defaults to Allow), and Inheritance is optional (e.g., ContainerInherit,ObjectInherit).
Inheritance
- Object
- FileAclControl
Constructors
public FileAclControl(String id, String title, String path) #Creates a file ACL control for the given target path.
Parameters
- id System.String
- title System.String
- path System.String
Methods
public virtual CxEval Evaluate(String host, CxFacts facts) #CxEvalEvaluates current ACL against desired entries per vendor.
Parameters
- host System.String
- facts ComputerX.Controls.CxFacts
public virtual Boolean IsApplicable(CxFacts facts) #BooleanChecks whether this control applies in the given facts context.
Parameters
- facts ComputerX.Controls.CxFacts
public virtual Object ReadCurrent(String host, CxFacts facts) #ObjectReads current DACL and returns it as normalized ACL lines.
Parameters
- host System.String
- facts ComputerX.Controls.CxFacts
public virtual Boolean TryWrite(String host, Object value, out String error) #BooleanAttempts to remediate ACL (not currently supported for this control).
Parameters
- host System.String
- value System.Object
- error System.String@
public FileAclControl WhereIs(CxCondition c) #FileAclControlSets an applicability predicate for this control.
Parameters
- c ComputerX.Controls.CxCondition
public FileAclControl WithDesired(CxVendor vendor, IEnumerable<String> aceEntries, String ruleId = null, String note = null, String description = null, String referenceUrl = null, String severity = null, String category = null, String[] tags = null) #FileAclControlAdds a vendor desired set of ACE entries with optional metadata.
Parameters
- vendor ComputerX.Controls.CxVendor
- aceEntries System.Collections.Generic.IEnumerable{System.String}
- ruleId System.String = null
- note System.String = null
- description System.String = null
- referenceUrl System.String = null
- severity System.String = null
- category System.String = null
- tags System.String[] = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public virtual String Id { get; } #Stable identifier of the control.
public virtual String Title { get; } #Human-friendly control title.
public virtual CxValueKind ValueKind { get; } #Value kind for comparison (list of ACL lines).
public virtual CxComparator Comparator { get; } #Comparator used to validate current permissions include desired entries.
public String Path { get; } #Absolute path to the file or directory to evaluate.
public CxCondition Where { get; set; } #Optional applicability predicate limiting where the control applies.
public virtual IReadOnlyList<CxDesired> Desired { get; } #Vendor desired ACL entries (per baseline family).