hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Casey Brotherton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12344) validateSocketPathSecurity0 message could be better
Date Thu, 03 Sep 2015 04:00:47 GMT

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

Casey Brotherton commented on HADOOP-12344:
-------------------------------------------

Hello [~cmccabe]

Thanks for reviewing the changes.  Working on correcting them.

Reasons for the dynamic allocation changes:
1)  As I changed the error messages, the three very similar messages looked too copy and paste
to me.
I thought it better to have one newIOexception

2)  PATH_MAX on my system is 4096 chars.  Seemed better to dynamically allocate instead of
reserving 2*PATH_MAX+something
up front.

I will change it to be three newIOexceptions, and check the strdup return code, and post a
change shortly.

Thanks,
Casey

> validateSocketPathSecurity0 message could be better
> ---------------------------------------------------
>
>                 Key: HADOOP-12344
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12344
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: net
>            Reporter: Casey Brotherton
>            Assignee: Casey Brotherton
>            Priority: Trivial
>         Attachments: HADOOP-12344.001.patch, HADOOP-12344.002.patch, HADOOP-12344.patch
>
>
> When a socket path does not have the correct permissions, an error is thrown.
> That error just has the failing component of the path and not the entire path of the
socket.
> The entire path of the socket could be printed out to allow for a direct check of the
permissions of the entire path.
> {code}
> java.io.IOException: the path component: '/' is world-writable.  Its permissions are
0077.  Please fix this or select a different socket path.
> 	at org.apache.hadoop.net.unix.DomainSocket.validateSocketPathSecurity0(Native Method)
> 	at org.apache.hadoop.net.unix.DomainSocket.bindAndListen(DomainSocket.java:189)
> ...
> {code}
> The error message could also provide the socket path:
> {code}
> java.io.IOException: the path component: '/' is world-writable.  Its permissions are
0077.  Please fix this or select a different socket path than '/var/run/hdfs-sockets/dn'
> {code}



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

Mime
View raw message