Skip to content

Commit cf8b8a9

Browse files
author
James Forshaw
committed
Added simpler function to get a security attribute.
1 parent eee8fe2 commit cf8b8a9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

NtApiDotNet/NtToken.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,6 +2209,16 @@ public ClaimSecurityAttribute GetSecurityAttributeByName(string name, ClaimSecur
22092209
return ret.FirstOrDefault();
22102210
}
22112211

2212+
/// <summary>
2213+
/// Get a security attribute by name.
2214+
/// </summary>
2215+
/// <param name="name">The name of the security attribute, such as WIN://PKG</param>
2216+
/// <returns>The security attribute or null if not found.</returns>
2217+
public ClaimSecurityAttribute GetSecurityAttributeByName(string name)
2218+
{
2219+
return GetSecurityAttributeByName(name, ClaimSecurityValueType.None);
2220+
}
2221+
22122222
private void SetIntegrityLevelSid(Sid sid)
22132223
{
22142224
using (SafeSidBufferHandle sid_buffer = sid.ToSafeBuffer())

0 commit comments

Comments
 (0)