|
@@ -17,7 +17,7 @@ namespace Security2 |
|
|
|
|
|
|
|
|
ace = (FileSystemAuditRule)sd.AuditRuleFactory(account, (int)rights, false, inheritanceFlags, propagationFlags, type); |
|
|
ace = (FileSystemAuditRule)sd.AuditRuleFactory(account, (int)rights, false, inheritanceFlags, propagationFlags, type); |
|
|
|
|
|
|
|
|
sd.RemoveAuditRuleSpecific(ace); |
|
|
|
|
|
|
|
|
sd.RemoveAuditRule(ace); |
|
|
|
|
|
|
|
|
file.SetAccessControl(sd); |
|
|
file.SetAccessControl(sd); |
|
|
} |
|
|
} |
|
@@ -28,7 +28,7 @@ namespace Security2 |
|
|
var sd = directory.GetAccessControl(AccessControlSections.Audit); |
|
|
var sd = directory.GetAccessControl(AccessControlSections.Audit); |
|
|
|
|
|
|
|
|
ace = (FileSystemAuditRule)sd.AuditRuleFactory(account, (int)rights, false, inheritanceFlags, propagationFlags, type); |
|
|
ace = (FileSystemAuditRule)sd.AuditRuleFactory(account, (int)rights, false, inheritanceFlags, propagationFlags, type); |
|
|
sd.RemoveAuditRuleSpecific(ace); |
|
|
|
|
|
|
|
|
sd.RemoveAuditRule(ace); |
|
|
|
|
|
|
|
|
directory.SetAccessControl(sd); |
|
|
directory.SetAccessControl(sd); |
|
|
} |
|
|
} |
|
|