Return-Path: X-Original-To: apmail-hadoop-common-dev-archive@www.apache.org Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D46CB3C for ; Thu, 5 Jul 2012 23:52:37 +0000 (UTC) Received: (qmail 31725 invoked by uid 500); 5 Jul 2012 23:52:35 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 31617 invoked by uid 500); 5 Jul 2012 23:52:35 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 31587 invoked by uid 99); 5 Jul 2012 23:52:34 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 23:52:34 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id B699614285B for ; Thu, 5 Jul 2012 23:52:34 +0000 (UTC) Date: Thu, 5 Jul 2012 23:52:34 +0000 (UTC) From: "Tsz Wo (Nicholas), SZE (JIRA)" To: common-dev@hadoop.apache.org Message-ID: <2050647285.11743.1341532354749.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Resolved] (HADOOP-6527) UserGroupInformation::createUserForTesting clobbers already defined group mappings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-6527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tsz Wo (Nicholas), SZE resolved HADOOP-6527. -------------------------------------------- Resolution: Fixed Fix Version/s: 1-win 1.1.0 I have committed this. Thanks, Ivan! > 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 > Assignee: Ivan Mitic > Fix For: 1.1.0, 1-win > > Attachments: HADOOP-6527-branch-1-win_UGI_fix(2).patch, HADOOP-6527-branch-1-win_UGI_fix.patch > > > 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. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira