Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14155

KerberosName.replaceParameters() may throw java.lang.ArrayIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 2.7.3
    • None
    • security
    • None

    Description

      In core-site.xml:
      <property>
      <name>hadoop.security.auth_to_local</name>
      <value>
      RULE:[1:$1](.*)
      RULE:[2:$1$2](.*)
      </value>
      </property>

      KerberosName.replaceParameters() replaces the numbered parameters of the form $n where n is from 1 to the length of params. Normal text is copied directly and $n is replaced by the corresponding parameter.
      However, when RULE is configued as the following way (although it's wrong)

      RULE:[1:$1$2](.*)

      Then run command

      hadoop org.apache.hadoop.security.HadoopKerberosName testprinc@TESTREALM.COM

      It will throw ArrayIndexOutOfBoundsException instead of BadFormatString exception.

      Attachments

        1. HADOOP-14155.patch
          1.0 kB
          Dazhuang Su

        Issue Links

          Activity

            People

              Unassigned Unassigned
              DylanSu Dazhuang Su
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: