hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Urko Benito (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-506) Incorrect UserName at Solaris because it has no "whoami" command by default
Date Tue, 28 Jul 2009 07:49:14 GMT

    [ https://issues.apache.org/jira/browse/HDFS-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735972#action_12735972
] 

Urko Benito commented on HDFS-506:
----------------------------------

I'm working on a patch to solve this issue. 

You're right, on Solaris is "id -un" but this command is at "/usr/xpg4/bin/id" this's a BSD
style command. The "/usr/bin/id" command is a SRV style so it has only the "-a" and "-p" options

{quote}
 \# uname -a
SunOS zion 5.10 Generic_138888-07 sun4u sparc SUNW,Sun-Fire-280R
 \# /usr/xpg4/bin/id -un
root
 \# /usr/xpg4/bin/id -Gn
root other bin sys adm uucp mail tty lp nuucp daemon
{quote}

But the question is at _UnixUserGroupInformation.java_ the method _static String getUnixUserName()
throws IOException_ calls to _executeShellCommand( new String[]{Shell.USER_NAME_COMMAND})_
but i think this can be rewrite to

{quote}
static String getUnixUserName() throws IOException {
 return System.getProperty("user.name");
}
{quote}


Or change the *USER_NAME_COMMAND* and *getGROUPS_COMMAND*


What do you think is better solution?




> Incorrect UserName at Solaris because it has no "whoami" command by default
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-506
>                 URL: https://issues.apache.org/jira/browse/HDFS-506
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.20.1
>         Environment: OS: SunOS 5.10
>            Reporter: Urko Benito
>   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.


Mime
View raw message