diff options
Diffstat (limited to 'base/common/src/com/netscape/cmscore/authentication')
-rw-r--r-- | base/common/src/com/netscape/cmscore/authentication/AuthSubsystem.java | 4 | ||||
-rw-r--r-- | base/common/src/com/netscape/cmscore/authentication/PasswdUserDBAuthentication.java | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/base/common/src/com/netscape/cmscore/authentication/AuthSubsystem.java b/base/common/src/com/netscape/cmscore/authentication/AuthSubsystem.java index fbb589376..c5b09a7d7 100644 --- a/base/common/src/com/netscape/cmscore/authentication/AuthSubsystem.java +++ b/base/common/src/com/netscape/cmscore/authentication/AuthSubsystem.java @@ -458,9 +458,9 @@ public class AuthSubsystem implements IAuthSubsystem { * <P> */ public void shutdown() { - for (Enumeration<String> e = mAuthMgrInsts.keys(); e.hasMoreElements();) { + for (AuthManagerProxy proxy : mAuthMgrInsts.values()) { - IAuthManager mgr = get(e.nextElement()); + IAuthManager mgr = proxy.getAuthManager(); log(ILogger.LL_INFO, CMS.getLogMessage("CMSCORE_AUTH_INSTANCE_SHUTDOWN", mgr.getName())); diff --git a/base/common/src/com/netscape/cmscore/authentication/PasswdUserDBAuthentication.java b/base/common/src/com/netscape/cmscore/authentication/PasswdUserDBAuthentication.java index 5b6418c00..fa8696c1d 100644 --- a/base/common/src/com/netscape/cmscore/authentication/PasswdUserDBAuthentication.java +++ b/base/common/src/com/netscape/cmscore/authentication/PasswdUserDBAuthentication.java @@ -191,7 +191,11 @@ public class PasswdUserDBAuthentication implements IAuthManager { e.printStackTrace(); // not a user in our user/group database. log(ILogger.LL_SECURITY, CMS.getLogMessage("CMSCORE_AUTH_UID_NOT_FOUND", uid, e.toString())); - throw new EInvalidCredentials(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_CREDENTIAL")); + throw new EInvalidCredentials(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_CREDENTIAL") + " " + e.getMessage()); + } + if (user == null) { + throw new EInvalidCredentials(CMS.getUserMessage("CMS_AUTHENTICATION_INTERNAL_ERROR", + "Failure in User Group subsystem.")); } authToken.set(TOKEN_USERDN, user.getUserDN()); authToken.set(TOKEN_USERID, user.getUserID()); |