public AccessControlList(
            BinaryReader reader,
            Int64 descriptorBase,
            UInt32 offset
            )
        {
            // seek to beginning of ACL bytes
            reader.BaseStream.Position  = descriptorBase + offset;
            reader.BaseStream.Position += 2;  // skip uninteresting bytes

            this.Size     = reader.ReadUInt16();
            this.AceCount = reader.ReadUInt16();

            for (UInt32 i = 0; i < this.AceCount; ++i)
            {
                // construct the new ACE
                AccessControlEntry temp = new AccessControlEntry(reader);

                // add the new ACE to the list
                AceList.Add(temp);

                // update the stream position based on the size of the processed entry
                reader.BaseStream.Position += temp.Size;
            }
        }
Beispiel #2
0
 public Acl(AclOrder order)
 {
     _order = order;
     _allow = new AceList <T>();
     _deny  = new AceList <T>();
 }