From Bugzilla Helper: User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko) Description of problem: When you type "ls -Z" some entries will be reported as containing ACLs (through a '+' appended to the Unix permission mode) when they don't contain any ACLs. This is due to the boolean representing the ACL state not being correctly initialised. Stephen Smalley suggested the following patch to solve the problem: --- ls.c.old 2004-06-07 08:51:24.000000000 -0400 +++ ls.c 2004-06-07 08:51:34.000000000 -0400 @@ -2528,7 +2528,7 @@ } #if HAVE_ACL || USE_ACL - if (format == long_format) + if (format == long_format || format == security_format) { int n = file_has_acl (path, &f->stat); f->have_acl = (0 < n); Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: Run "ls -lZ" on a SE Linux system and observe that one entry will falsely have a '+' appended to it. Actual Results: [root@fedora-se rjc]# ls -lZ /root -rw-r--r-- root rjc root:object_r:user_home_ro_t answers_to_questions.txt -rw-r--r--+ root root root:object_r:user_home_ra_t thanks.txt_append_only_dont_edit_with_vi [root@fedora-se rjc]# Expected Results: [root@fedora-se rjc]# ls -lZ /root -rw-r--r-- root rjc root:object_r:user_home_ro_t answers_to_questions.txt -rw-r--r-- root root root:object_r:user_home_ra_t thanks.txt_append_only_dont_edit_with_vi [root@fedora-se rjc]# Additional info:
I used a slightly different patch: --- coreutils-5.2.1/src/ls.c 2004-06-04 09:55:05.010506573 +0100 +++ coreutils-5.2.1/src/ls.c 2004-06-07 14:18:07.448963915 +0100 @@ -2530,7 +2530,11 @@ } #if HAVE_ACL || USE_ACL - if (format == long_format) + if (format == long_format +#ifdef WITH_SELINUX + || format == security_format +#endif + ) { int n = file_has_acl (path, &f->stat); f->have_acl = (0 < n); Fixed in coreutils-5.2.1-15.