[
https://issues.apache.org/jira/browse/HADOOP-13079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15269416#comment-15269416
]
Allen Wittenauer commented on HADOOP-13079:
-------------------------------------------
bq. OK, so Linux is technically a UNIX-like system rather than a licensee of
the UNIX trademark. I don't feel that this is relevant to the discussion here.
Then stop bringing up (traditional) UNIX if you feel it isn't relevant and
especially when you've used the term incorrectly.
bq. Dumping control characters out on an interactive terminal is a security
vulnerability
It is, but changing ls' behavior isn't going to fix that vulnerability.
There's a reason why all of those links up there you quoted talk about
terminals and terminal emulation and what is actually vulnerable without
identifying specific vulnerabilities in specific commands.
bq. I can't think of a single reason why we would want this to be the default.
Yup, I can't think of why -q should be the default either... but more
importantly, neither could POSIX to the point that it demanded the standard
have -q be the default.
> Add -q to fs -ls to print non-printable characters
> --------------------------------------------------
>
> Key: HADOOP-13079
> URL: https://issues.apache.org/jira/browse/HADOOP-13079
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: John Zhuge
> Assignee: John Zhuge
> Labels: supportability
>
> Add option {{-q}} to "hdfs dfs -ls" to print non-printable characters as "?".
> Non-printable characters are defined by
> [isprint(3)|http://linux.die.net/man/3/isprint] according to the current
> locale.
> Default to {{-q}} behavior on terminal; otherwise, print raw characters. See
> the difference in these 2 command lines:
> * {{hadoop fs -ls /dir}}
> * {{hadoop fs -ls /dir | od -c}}
> In C, {{isatty(STDOUT_FILENO)}} is used to find out whether the output is a
> terminal. Since Java doesn't have {{isatty}}, I will use JNI to call C
> {{isatty()}} because the closest test {{System.console() == null}} does not
> work in some cases.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]