directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r224418 - /directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java
Date Fri, 22 Jul 2005 23:16:30 GMT
Author: akarasulu
Date: Fri Jul 22 16:16:26 2005
New Revision: 224418

URL: http://svn.apache.org/viewcvs?rev=224418&view=rev
Log:
complaining when a krb5Key is returned as a string rather than converting it into bytes

Modified:
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java?rev=224418&r1=224417&r2=224418&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java
(original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java
Fri Jul 22 16:16:26 2005
@@ -32,6 +32,8 @@
 import org.apache.kerberos.store.KerberosAttribute;
 import org.apache.kerberos.store.PrincipalStoreEntry;
 import org.apache.kerberos.store.PrincipalStoreEntryModifier;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.logging.Log;
 
 /**
  * Encapsulates the action of looking up a principal in an embedded ApacheDS DIT.
@@ -41,6 +43,7 @@
  */
 public class GetPrincipal implements ContextOperation
 {
+    private final static Log log = LogFactory.getLog( GetPrincipal.class );
     /** The name of the principal to get. */
     private final KerberosPrincipal principal;
 
@@ -143,7 +146,9 @@
         byte[] keyBytes = null;
         if ( key instanceof String )
         {
-            keyBytes = ( ( String ) key ).getBytes();
+            String msg = "JNDI should not return a string for the kerberos key: check the
";
+            log.error( msg );
+            throw new NamingException( msg );
         }
         else
         {



Mime
View raw message