From 299e58db28202be8706dee1c570c382e1489213b Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Mon, 9 Oct 2023 16:00:18 +1100 Subject: AclDialog --- SecurityIdentifier.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'SecurityIdentifier.cs') diff --git a/SecurityIdentifier.cs b/SecurityIdentifier.cs index 8ffaa1b..98818e0 100644 --- a/SecurityIdentifier.cs +++ b/SecurityIdentifier.cs @@ -15,7 +15,6 @@ public static class WellKnownSid { public static readonly SecurityIdentifier CreatorGroupSid = new("S-1-3-1"); private static readonly (string name, SecurityIdentifier sid)[] nameMap = new[] { - ( "Nobody", NullSid ), ( "Everyone", WorldSid ), ( "LOCAL", LocalSid ), ( "CREATOR OWNER", CreatorGroupSid ), @@ -32,7 +31,7 @@ public static class WellKnownSid { } } - public static string? TranslateSid(SecurityIdentifier sid) { + public static string? TranslateName(SecurityIdentifier sid) { try { return nameMap.First(x => x.sid == sid).name; } catch(InvalidOperationException) { @@ -117,8 +116,7 @@ public class SecurityIdentifier { } } - public override string ToString() => - WellKnownSid.TranslateSid(this) ?? SddlForm; + public override string ToString() => SddlForm; public static bool operator ==(SecurityIdentifier? x, SecurityIdentifier? y) => x?.SidStruct.Equals(y?.SidStruct) ?? false; -- cgit v1.3