-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Eric Blake on 1/17/2006 11:05 AM: > > The problem is that tcsh 6.14.00 treats LS_COLORS as a magic > environment variable, also parsing it for its own use in the > tcsh builtin ls-F. This means that coreutils dircolors, when given > an SUID coloration, will output data that is expected by coreutils > ls but unexpected by unpatched tcsh.
And here's a workaround for coreutils to make tcsh be silent when it doesn't recognize all the categories output by dircolors. I verified that tcsh goes ahead and sets LS_COLORS in spite of the warning, so silencing the warning is safe. 2006-01-18 Eric Blake <[EMAIL PROTECTED]> * src/dircolors.c (main): Silence stderr to avoid warnings from tcsh. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDzklE84KuGfSFAYARArUPAKCDfSvXmB4J2VlP4xniAMte9andWACgy6/T 853y4bO0Or5HpoUUwBQqttg= =iUZd -----END PGP SIGNATURE-----
Index: src/dircolors.c =================================================================== RCS file: /sources/coreutils/coreutils/src/dircolors.c,v retrieving revision 1.97 diff -u -p -r1.97 dircolors.c --- src/dircolors.c 24 Oct 2005 10:39:46 -0000 1.97 +++ src/dircolors.c 18 Jan 2006 13:54:50 -0000 @@ -1,5 +1,5 @@ /* dircolors - output commands to set the LS_COLOR environment variable - Copyright (C) 1996-2005 Free Software Foundation, Inc. + Copyright (C) 1996-2006 Free Software Foundation, Inc. Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000 H. Peter Anvin This program is free software; you can redistribute it and/or modify @@ -504,8 +504,12 @@ to select a shell syntax are mutually ex } else { + /* tcsh treats LS_COLORS as a magic shell variable for its + builtin ls-F, but does not recognize all the categories + that coreutils ls does. Therefore, silence stderr to + avoid messages like "Unknown colorls variable `su'.". */ prefix = "setenv LS_COLORS '"; - suffix = "'\n"; + suffix = "' >&/dev/null\n"; } fputs (prefix, stdout); fwrite (s, 1, len, stdout);
_______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils