[
https://issues.apache.org/jira/browse/HADOOP-12344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alan Burlison reopened HADOOP-12344:
------------------------------------
This fix introduced multiple sprintf format warnings which need attention.
{code}
[exec]
op/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:488:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has
type ‘long long int’ [-Wformat=]
[exec] check, path, mode, (long long)st.st_uid, (long
long)st.st_gid, check);
[exec] ^
[exec]
/pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:488:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has
type ‘long long int’ [-Wformat=]
[exec]
/pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:500:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has
type ‘long long int’ [-Wformat=]
[exec] check, check);
[exec] ^
[exec]
/pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:500:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has
type ‘long long int’ [-Wformat=]
[exec]
/pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:513:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has
type ‘long long int’ [-Wformat=]
[exec] (long long)uid, check, (long long)uid, check);
[exec] ^
[exec]
/pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:513:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has
type ‘long long int’ [-Wformat=]
[exec]
/pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:513:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 8 has
type ‘long long int’ [-Wformat=]
[exec]
/pool/home/alanbur/bigdata/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c:513:10:
warning: format ‘%ld’ expects argument of type ‘long int’, but argument 10 has
type ‘long long int’ [-Wformat=]
{code}
> Improve validateSocketPathSecurity0 error message
> -------------------------------------------------
>
> 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
> Fix For: 2.8.0
>
> Attachments: HADOOP-12344.001.patch, HADOOP-12344.002.patch,
> HADOOP-12344.003.patch, HADOOP-12344.004.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)