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

UserGroupInformation::createUserForTesting clobbers already defined group mappings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0, 1-win
    • security
    • None
    • Reviewed

    Description

      In UserGroupInformation::createUserForTesting the follow code creates a new groups instance, obliterating any groups that have been previously defined in the static groups field.

          if (!(groups instanceof TestingGroups)) {
            groups = new TestingGroups();
          }
      

      This becomes a problem in tests that start a Mini

      {DFS,MR}

      Cluster and then create a testing user. The user that started the user (generally the real user running the test) immediately has their groups wiped out and is prevented from accessing files/folders/queues they should be able to. Before the UserGroupInformation.createRemoteUserForTesting, calls to userA.getGroups may return

      {"a", "b", "c"}

      and immediately after the new fake user is created, the same call will return an empty array.

      Attachments

        Issue Links

          Activity

            People

              ivanmi Ivan Mitic
              jghoman Jakob Homan
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: