public static SecurityIdentifier FromRpcSid(RpcSid sid, uint id = 0, SidAttributes attributes = 0) { if (sid == null) { throw new ArgumentNullException(nameof(sid)); } return(new SecurityIdentifier(sid.IdentifierAuthority.Authority, Concat(sid.SubAuthority, id), attributes)); }
public RpcSid ToRpcSid() { var sid = new RpcSid { Revision = 1, IdentifierAuthority = new RpcSidIdentifierAuthority { IdentifierAuthority = new byte[] { 0, 0, 0, 0, 0, (byte)authority } }, SubAuthority = subAuthorities, SubAuthorityCount = (byte)subAuthorities.Count() }; return(sid); }
public RpcSid ToRpcSid() { var sid = new RpcSid { Revision = 1, IdentifierAuthority = new RpcSidIdentifierAuthority { IdentifierAuthority = new byte[] { 0, 0, 0, 0, 0, (byte)this.authority } }, SubAuthority = this.subAuthorities, SubAuthorityCount = (byte)this.subAuthorities.Length }; return(sid); }
public static SecurityIdentifier FromRpcSid(RpcSid sid, int id = 0, SidAttributes attributes = 0) { return(new SecurityIdentifier(sid.IdentifierAuthority.Authority, Concat(sid.SubAuthority, id), attributes)); }
public void Unmarshal(NdrBuffer buffer) { buffer.ReadConformantStruct <RpcSid>(p => Sid = p); Attributes = (SidAttributes)buffer.ReadInt32LittleEndian(); }