directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSERVER-1882) KertabEncoder.write() method should take into account the size of the entries list to determine the buffer size
Date Tue, 20 Aug 2013 13:30:53 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13744955#comment-13744955
] 

Hudson commented on DIRSERVER-1882:
-----------------------------------

SUCCESS: Integrated in Hadoop-Hdfs-trunk #1497 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1497/])
HADOOP-9860. Remove class HackedKeytab and HackedKeytabEncoder from hadoop-minikdc once jira
DIRSERVER-1882 solved. (ywskycn via tucu) (tucu: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1515652)
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-minikdc/pom.xml
* /hadoop/common/trunk/hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/directory/server/kerberos/shared/keytab/HackedKeytab.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/directory/server/kerberos/shared/keytab/HackedKeytabEncoder.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/hadoop/minikdc/MiniKdc.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-minikdc/src/test/java/org/apache/hadoop/minikdc/TestMiniKdc.java

                
> KertabEncoder.write() method should take into account the size of the entries list to
determine the buffer size
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1882
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1882
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.0-M14
>            Reporter: Wei Yan
>             Fix For: 2.0.0-M15
>
>
> Currently {{KeytabEncoder.write()}} always allocate 512 bytes as the buffer size, and
doesn't consider the entities list size.
> {code}
> ByteBuffer write( byte[] keytabVersion, List<KeytabEntry> entries )
> {
>   ByteBuffer buffer = ByteBuffer.allocate( 512 );
>   putKeytabVersion( buffer, keytabVersion );
>   putKeytabEntries( buffer, entries );
>   buffer.flip();
>   return buffer;
> }
> {code}
> For each entity, {{KeytabEncoder.putKeytabEntry()}} allocates 100 buffer size.
> {code}
> private ByteBuffer putKeytabEntry( KeytabEntry entry )
> {
>   ByteBuffer buffer = ByteBuffer.allocate( 100 );
>   ......
> }
> {code}
> This mechanism fails when we create multiple principals in one keytab file. 
> {{KeytabEncoder.write()}} method should take into account the size of entries list to
determine the buffer size. And a reasonable max size (100 currently) per entry must be determined.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message