Bug 121292

Summary: ls -lZ displays owner as "root" even when it can't stat the file
Product: [Fedora] Fedora Reporter: Russell Coker <russell>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 5.2.1-6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-26 23:38:13 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Russell Coker 2004-04-20 00:48:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)

Description of problem:
?---------  root     root     (null)      oracle

Above is a line from "ls -lZ /" on my Fedora play machine.

lstat64("oracle", 0x905398c)    = -1 EACCES (Permission denied)

Above is a line from the strace output of the above ls command, note that the stat fails and therefore the ls command can't know what UID owns the file/directory in question.  In this test it is uid 100.

The UID and GID fields should be changed from "root" to be either "?" characters or spaces.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Run SE Linux on your machine, login as a user_r user and run
"ls -lZ /".  Note that "ls -l /" gives correct results.

Additional info:
Comment 1 Tim Waugh 2004-04-20 13:30:42 EDT
Confirmed.  Should be fixed in coreutils-5.2.1-6.
Comment 2 Russell Coker 2006-03-26 23:38:13 EST
As this has been fixed for ages (and is fixed in FC5) I think it should be