diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2013-02-27 21:36:23 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2013-03-18 14:03:54 +0100 |
| commit | c6204281c819ea4514952ed7623e282babcb5f8c (patch) | |
| tree | c15b27b53f1967b062f219c401f28d46e5fdd654 /src/main/java/com/c2kernel/lookup/AgentPath.java | |
| parent | 6e35118970c7af70eb0ac938859d794f7348d367 (diff) | |
Morelookup
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/AgentPath.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lookup/AgentPath.java | 15 |
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());
|
