This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 411181 - %C output format (selinux file security context) of stat broken
%C output format (selinux file security context) of stat broken
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-04 17:03 EST by Frank Sweetser
Modified: 2007-12-06 15:51 EST (History)
1 user (show)

See Also:
Fixed In Version: 6.9-12.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-06 15:51:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Frank Sweetser 2007-12-04 17:03:44 EST
According to the manpage for format, --format=%C should display the selinux
security context of a given file.

On Fedora 7, the output makes sense and agrees with ls -Z:

[fs@avocent ~]$ ls -Z /bin/ls
-rwxr-xr-x  root root system_u:object_r:ls_exec_t      /bin/ls
[fs@avocent ~]$ stat --format=%C /bin/ls
system_u:object_r:ls_exec_t

On Fedora 8, however, stat produces what appears to be a few bytes of garbage
that varies from file to file:

[root@gkar ~]# ls -Z /bin/ls
-rwxr-xr-x  root root system_u:object_r:bin_t          /bin/ls
[root@gkar ~]# stat --format=%C /bin/ls
%=s

This is on a Fedora 8 system with all patches as of 12/4/2007 applied.
Comment 1 Ondrej Vasik 2007-12-04 18:13:09 EST
Thanks for report, solution of problem found in upstream, fix will be pushed to
rawhide and F8 tomorrow.
Comment 2 Frank Sweetser 2007-12-04 18:16:03 EST
Thanks!
Comment 3 Ondrej Vasik 2007-12-05 09:14:01 EST
Built as coreutils-6.9-12.fc8 - bug will get closed after the push of package to
stable F8.
Comment 4 Fedora Update System 2007-12-06 15:51:45 EST
coreutils-6.9-12.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.