From 2c7b0de024e270cdfd348818688e4a4c083503a1 Mon Sep 17 00:00:00 2001 From: Yvan Duhamel Date: Wed, 13 Mar 2019 13:55:47 +0100 Subject: [PATCH] Remove unnecessary code --- LDAPCP/LDAPCP.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/LDAPCP/LDAPCP.cs b/LDAPCP/LDAPCP.cs index d20e204..6cb9526 100644 --- a/LDAPCP/LDAPCP.cs +++ b/LDAPCP/LDAPCP.cs @@ -1167,12 +1167,6 @@ protected virtual List GetGroupsFromActiveDirectory(LDAPConnection ldap { List groups = new List(); string path = ldapConnection.Path; - if (ldapConnection.UserServerDirectoryEntry) - { - DirectoryEntry de = Domain.GetComputerDomain().GetDirectoryEntry(); - path = de.Path; - de.Dispose(); - } string loggingMessage = $"[{ProviderInternalName}] Augmentation of user {currentContext.IncomingEntity.Value} in AD server \"{path}\" with AuthenticationType \"{ldapConnection.AuthenticationTypes}\" and authenticating "; loggingMessage += ldapConnection.UserServerDirectoryEntry ? "as process identity" : $"with credentials \"{ldapConnection.Username}\""; ClaimsProviderLogging.Log(loggingMessage, TraceSeverity.Verbose, EventSeverity.Information, TraceCategory.Augmentation);