Package: coreutils
Version: 6.10-3
Severity: normal

unstable0:~/coreutils-6.10# ls -l /
total 158
drwxr-xr-x+  2 root root  4096 2008-03-25 10:02 bin
drwxr-xr-x+  6 root root  1024 2008-03-21 12:30 boot
drwxr-xr-x+ 16 root root  3700 2008-03-25 13:38 dev
drwxr-xr-x+ 80 root root  4096 2008-03-25 13:38 etc
drwxr-xr-x+  3 root root  4096 2008-02-15 22:08 home

Above is part of the output of "ls -l" on a machine running Unstable with
SE Linux.  The directories in question have SE Linux contexts but no ACLs.

There is no point to indicating that a filesystem object has a SE Linux
context as in modern versions of SE Linux every file will have one and
therefore you just get one character of the ls output wasted for no good
reason.  Also it makes it less obvious when a file has a POSIX ACL.


diff -ru coreutils.org/src/ls.c coreutils.patched/src/ls.c
--- coreutils-6.10/src/ls.c     2008-03-25 13:07:53.000000000 +1100
+++ coreutils-6.10/src/ls.c     2008-03-25 13:19:17.000000000 +1100
@@ -2667,20 +2667,6 @@
                          : lgetfilecon (absolute_name, &f->scontext));
          err = (attr_len < 0);
 
-         if (err == 0 && f->scontext != NULL)
-           have_acl = ! STREQ ("unlabeled", f->scontext);
-         else
-           {
-             f->scontext = UNKNOWN_SECURITY_CONTEXT;
-
-             /* When requesting security context information, don't make
-                ls fail just because the file (even a command line argument)
-                isn't on the right type of file system.  I.e., a getfilecon
-                failure isn't in the same class as a stat failure.  */
-             if (err == 0 || errno == ENOTSUP || errno == ENODATA)
-               err = 0;
-           }
-
          if (err == 0 && ! have_acl && format == long_format)
            {
              int n = file_has_acl (absolute_name, &f->stat);



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to