예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 public static SecurityIdentifier FromRpcSid(RpcSid sid, int id = 0, SidAttributes attributes = 0)
 {
     return(new SecurityIdentifier(sid.IdentifierAuthority.Authority, Concat(sid.SubAuthority, id), attributes));
 }
예제 #5
0
        public void Unmarshal(NdrBuffer buffer)
        {
            buffer.ReadConformantStruct <RpcSid>(p => Sid = p);

            Attributes = (SidAttributes)buffer.ReadInt32LittleEndian();
        }