| | 1 | | using System.Collections.Generic; |
| | 2 | | using System.Security.Principal; |
| | 3 | | using SharpHoundRPC.Handles; |
| | 4 | | using SharpHoundRPC.SAMRPCNative; |
| | 5 | |
|
| | 6 | | namespace SharpHoundRPC.Wrappers |
| | 7 | | { |
| | 8 | | public class SAMAlias : SAMBase, ISAMAlias |
| | 9 | | { |
| 0 | 10 | | public SAMAlias(SAMHandle handle) : base(handle) |
| 0 | 11 | | { |
| 0 | 12 | | } |
| | 13 | |
|
| 0 | 14 | | public string Name { get; set; } |
| 0 | 15 | | public int Rid { get; set; } |
| | 16 | |
|
| | 17 | | public Result<IEnumerable<SecurityIdentifier>> GetMembers() |
| 0 | 18 | | { |
| 0 | 19 | | var (status, members, count) = SAMMethods.SamGetMembersInAlias(Handle); |
| | 20 | |
|
| 0 | 21 | | if (status.IsError()) |
| 0 | 22 | | { |
| 0 | 23 | | return status; |
| | 24 | | } |
| | 25 | |
|
| 0 | 26 | | return Result<IEnumerable<SecurityIdentifier>>.Ok(members.GetData(count)); |
| | 27 | |
|
| 0 | 28 | | } |
| | 29 | | } |
| | 30 | | } |