Bug 216672

Summary: stat -c "%C" prints "(null)" in apite of the security context.
Product: [Fedora] Fedora Reporter: KaiGai Kohei <kaigai>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: meyering
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-13 08:01:24 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
This patch enables to read security context anytime to prepare parsing "%C" none

Description KaiGai Kohei 2006-11-21 09:46:32 EST
Description of problem:
When we execute 'stat' with -c option and a format string including "%C",
it prints "(null)" in spite of the security context of the files specified.

Version-Release number of selected component (if applicable):
I confirmed it on coreutils-5.97-14.fc7.
Probably, we can reproduce this problem in any recent version of coreutils.

How reproducible:
% stat -c "%C" hoge.txt
(null)

We expect the following result.
% stat -c "%C" hoge.txt
user_u:object_r:user_home_t:s0
  
Additional info:
Comment 1 KaiGai Kohei 2006-11-21 09:46:32 EST
Created attachment 141767 [details]
This patch enables to read security context anytime to prepare parsing "%C"