You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Jakob Homan (JIRA)" <ji...@apache.org> on 2010/01/31 06:15:35 UTC

[jira] Created: (HADOOP-6527) UserGroupInformation::createUserForTesting clobbers already defined group mappings

UserGroupInformation::createUserForTesting clobbers already defined group mappings
----------------------------------------------------------------------------------

                 Key: HADOOP-6527
                 URL: https://issues.apache.org/jira/browse/HADOOP-6527
             Project: Hadoop Common
          Issue Type: Bug
          Components: security
            Reporter: Jakob Homan


In UserGroupInformation::createUserForTesting the follow code creates a new groups instance, obliterating any groups that have been previously defined in the static groups field.
{code}    if (!(groups instanceof TestingGroups)) {
      groups = new TestingGroups();
    }
{code}
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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.