hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yongjun Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7386) Replace check "port number < 1024" with shared isPrivilegedPort method
Date Tue, 11 Nov 2014 21:46:35 GMT

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

Yongjun Zhang commented on HDFS-7386:
-------------------------------------

Hi Chris,

Need to consult you here. Thanks in advance for taking time to address my questions.

I am trying to add a method here like you suggested in HDFS-7382:
{code}
public static boolean isPrivilegedPort(int port) {
    return port < 1024;
}
{code}
Because Windows doesn't have the concept of privileged port, we might need to change the implementation
above to always return false for Windows.

Question 1: The original code in SaslDataTransferClient/Server.java doesn't distinguish bewteen
Windows and other OSes when doing the check "port < 1024", is this a bug for Windows in
the existing code? 

Question 2: I'm thinking about putting this code in SecurityUtil.java. Suppose we need to
check whether it's Windows and return false if it's windows, then I need to check the OS type
SecutityUtil.java, that means we need to check Shell.WINDOWS. That's where I got the idea
working on the issue reported in HADOOP-11293.  Creating a coupling to Shell in SecurityUtil
will work, but we can avoid this coupling by creating a mini version patch of HADOOP-11293
(I mean the new APIs we were talking about there), wonder whether it's acceptable. Would you
please comment?

Thanks a lot.




> Replace check "port number < 1024" with shared isPrivilegedPort method 
> -----------------------------------------------------------------------
>
>                 Key: HDFS-7386
>                 URL: https://issues.apache.org/jira/browse/HDFS-7386
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Yongjun Zhang
>            Assignee: Yongjun Zhang
>
> Per discussion in HDFS-7382, I'm filing this jira as a follow-up, to replace check "port
number < 1024" with shared isPrivilegedPort method.
> Thanks [~cnauroth] for the work on HDFS-7382 and suggestion there.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message