diff options
author | Abhishek Koneru <akoneru@redhat.com> | 2012-06-06 16:55:54 -0400 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-06-14 17:14:19 -0500 |
commit | c53ca291e21761f1de5417ef596afba395a7f5d1 (patch) | |
tree | 47a0cd8ecd9d36d414d9230282704e9f784d0a71 /base/common/src/com/netscape/cmscore/authentication/PasswdUserDBAuthentication.java | |
parent | 084a8cd360c7508febde06415d727d7d247b16ad (diff) | |
download | pki-c53ca291e21761f1de5417ef596afba395a7f5d1.tar.gz pki-c53ca291e21761f1de5417ef596afba395a7f5d1.tar.xz pki-c53ca291e21761f1de5417ef596afba395a7f5d1.zip |
Fixes for NULL_RETURNS Coverity Issues - Part 2
Diffstat (limited to 'base/common/src/com/netscape/cmscore/authentication/PasswdUserDBAuthentication.java')
-rw-r--r-- | base/common/src/com/netscape/cmscore/authentication/PasswdUserDBAuthentication.java | 6 |
1 files changed, 5 insertions, 1 deletions
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()); |