private void AddAccessAllowedAceInternal(AccessMask mask, AceFlags flags, string sid) { AddAce(AceType.Allowed, mask, flags, NtSecurity.SidFromSddl(sid)); }
/// <summary> /// Constructor from an SDDL string. /// </summary> /// <param name="sid">The SID in SDDL format.</param> /// <example> /// new Sid("S-1-0-0"); /// new Sid("WD"); /// </example> /// <seealso cref="NtSecurity.LookupAccountName(string)"/> public Sid(string sid) : this(NtSecurity.SidFromSddl(sid)) { }
/// <summary> /// Convert an SDDL SID string to a Sid /// </summary> /// <param name="sddl">The SDDL SID string</param> /// <param name="throw_on_error">True to throw on error.</param> /// <returns>The converted Sid</returns> /// <exception cref="NtException">Thrown if cannot convert from a SDDL string.</exception> public static NtResult <Sid> Parse(string sddl, bool throw_on_error) { return(NtSecurity.SidFromSddl(sddl, throw_on_error)); }
private void AddAccessDeniedAceInternal(uint mask, AceFlags flags, string sid) { AddAce(AceType.Denied, mask, flags, NtSecurity.SidFromSddl(sid)); }