summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/AgentPath.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/AgentPath.java')
-rw-r--r--src/main/java/com/c2kernel/lookup/AgentPath.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/com/c2kernel/lookup/AgentPath.java b/src/main/java/com/c2kernel/lookup/AgentPath.java
index c200d75..5dd177b 100644
--- a/src/main/java/com/c2kernel/lookup/AgentPath.java
+++ b/src/main/java/com/c2kernel/lookup/AgentPath.java
@@ -16,9 +16,8 @@ import java.security.NoSuchAlgorithmException;
import org.apache.xerces.impl.dv.util.Base64;
import com.c2kernel.common.ObjectNotFoundException;
-import com.c2kernel.lookup.ldap.LDAPLookupUtils;
import com.c2kernel.process.Gateway;
-import com.novell.ldap.LDAPEntry;
+import com.c2kernel.utils.Logger;
/**
@@ -68,11 +67,11 @@ public class AgentPath extends EntityPath
if (mAgentName==null)
{
try {
- LDAPEntry agentEntry = LDAPLookupUtils.getEntry(Gateway.getLookup().getConnection(), this.getDN() + mLocalPath);
- mAgentName = LDAPLookupUtils.getFirstAttributeValue(agentEntry,"uid");
- } catch (ObjectNotFoundException e) {
- mAgentName = "";
- }
+ mAgentName = Gateway.getLookup().getRoleManager().getAgentName(this);
+ } catch (ObjectNotFoundException e) {
+ Logger.error(e);
+ mAgentName="";
+ }
}
return mAgentName;
}
@@ -111,7 +110,7 @@ public class AgentPath extends EntityPath
mAgentName;
}
- static String generateUserPassword(String pass, String algo) throws NoSuchAlgorithmException {
+ public static String generateUserPassword(String pass, String algo) throws NoSuchAlgorithmException {
MessageDigest sha = MessageDigest.getInstance(algo);
sha.reset();
sha.update(pass.getBytes());