ana
ana

Reputation: 1111

In which cases DirectorySecurity.ModifyAccessRule returns false?

We found here the next snippet of code:

bool Result = false;
Security.ModifyAccessRule(AccessControlModification.Set, AccessRule, out Result);

if (!Result)
    return false;

In which exact cases "Result" is going to be false? Does anyone know? Please, help us.

Upvotes: 1

Views: 345

Answers (1)

Wayne Phipps
Wayne Phipps

Reputation: 2069

According to the docs, the result of Security.ModifyAccessRule would be true if the DACL is successfully modified; otherwise, false

See the following for reference:
https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.objectsecurity.modifyaccessrule?view=netframework-4.7.2

Upvotes: 2

Related Questions