Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 32910 invoked from network); 21 Sep 2009 17:17:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Sep 2009 17:17:40 -0000 Received: (qmail 15433 invoked by uid 500); 21 Sep 2009 17:17:40 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 15371 invoked by uid 500); 21 Sep 2009 17:17:40 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 15360 invoked by uid 99); 21 Sep 2009 17:17:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 17:17:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 17:17:37 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1EB4A234C044 for ; Mon, 21 Sep 2009 10:17:16 -0700 (PDT) Message-ID: <1566536335.1253553436109.JavaMail.jira@brutus> Date: Mon, 21 Sep 2009 10:17:16 -0700 (PDT) From: "Allen Wittenauer (JIRA)" To: common-issues@hadoop.apache.org Subject: [jira] Commented: (HADOOP-6272) Incorrect UserName at Solaris because it has no "whoami" command by default MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-6272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757958#action_12757958 ] Allen Wittenauer commented on HADOOP-6272: ------------------------------------------ Even tho I agree that maintaining OS specific code is ugly, I think it is unavoidable as long as we lack portable hooks into the OS. (No, reading the output of shell commands is not portable, this bug providing a relevant example.) Using System.getProperty("user.name") is an interesting idea. As you say, that leaves us with group. So.... I'd like to suggest that we create a file in hadoop/bin with the sole purpose of providing portable ways to determine group information. Then all the OS-specific ugliness could be pushed into that and outside the Java code. Make it something like "hadoop-portable-groups" to lower the chances of hitting something real. You also eliminate any double fork()'s at the Java-level that would likely be the result of any OS-specific issues (consider the 'whoami' vs. the '/usr/ucb/whoami' Solaris case). > Incorrect UserName at Solaris because it has no "whoami" command by default > --------------------------------------------------------------------------- > > Key: HADOOP-6272 > URL: https://issues.apache.org/jira/browse/HADOOP-6272 > Project: Hadoop Common > Issue Type: Improvement > Components: security, util > Affects Versions: 0.20.1, 0.21.0 > Environment: OS: SunOS 5.10 > Reporter: Urko Benito > Attachments: PermissionChecker.java.diff, Shell.java.diff, test-hadoop-security.tar.gz, UnixUserGroupInformation.java.diff > > Original Estimate: 24h > Remaining Estimate: 24h > > Solaris enviroment has no __whoami__ command, so the __getUnixUserName()__ at UnixUserGroupInformation class fails because it's calling to Shell.USER_NAME_COMMAND which is defines as "whoami". > So it launched an Exception and set the default "DrWho" username ignoring all the FileSystem permissions. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.