hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7503) Client#getRemotePrincipal NPEs when given invalid dfs.*.name
Date Tue, 20 Sep 2011 09:33:09 GMT

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

Uma Maheswara Rao G commented on HADOOP-7503:
---------------------------------------------

Hi Eli,

 It looks to me that in latest code null check has been handled.

{code}
public static String getServerPrincipal(String principalConfig,
      InetAddress addr) throws IOException {
    String[] components = getComponents(principalConfig);
    if (components == null || components.length != 3
        || !components[1].equals(HOSTNAME_PATTERN)) {
      return principalConfig;
    } else {
      if (addr == null) {
        throw new IOException("Can't replace " + HOSTNAME_PATTERN
            + " pattern since client address is null");
      }
      return replacePattern(components, addr.getCanonicalHostName());
    }
  }
{code}


is it the same place you are talking.
or, you are expecting some more meaning full message. Please confirm to proceed..


Thanks
Uma


> Client#getRemotePrincipal NPEs when given invalid dfs.*.name
> ------------------------------------------------------------
>
>                 Key: HADOOP-7503
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7503
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>    Affects Versions: 0.20.203.0, 0.23.0
>            Reporter: Eli Collins
>              Labels: newbie
>
> The following code in Client#getRemotePrincipal NPEs if security is enabled and dfs.https.address,
dfs.secondary.http.address, dfs.secondary.https.address, or fs.default.name, has an invalid
value (eg hdfs://foo.bar.com.foo.bar.com:1000). We should check address.checkAddress() for
null (or check this earlier)  and give a more helpful error message.
> {noformat}
>   return SecurityUtil.getServerPrincipal(conf.get(serverKey), address
>     .getAddress().getCanonicalHostName());
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message