A change like this invites security bugs:

J. Random Inexperienced Hacker writes a shell script.

He doesn't know that there is such a thing as the isatty() system call,
and therefore doesn't realize that it is even *possible* to change the
output of a command based on whether standard output refers to a
terminal (I know this described me for about two or three years after I
first started using Unix-like systems).

With the ls version before this change, J. Random Inexperienced Hacker
would see that there are multiple file names on a single line in the
output of ls, decide that ls output is too difficult to parse, and move
on to something else (probably find or some such).

With the ls version after this change, J. Random Inexperienced Hacker
might decide that the quoted nature of the ls output is *ideal* for
parsing, add something along the lines of
INPUT=$(ls /path/to/input/directory)
to his script, and think he's safe against filenames with spaces in them
("because ls quotes output").

The default enabling of the -C option when ls is connected to a terminal
doesn't do harm (and in fact discourages this kind of unsafe behaviour).
However, showing characters that aren't part of a filename in ls output
*by default* is confusing and (as the above shows) potentially
dangerous.

Please revert this change.

-- 
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
       people in the world who think they really understand all of its rules,
       and pretty much all of them are just lying to themselves too.
 -- #debian-devel, OFTC, 2016-02-12

Reply via email to