Bug 1152833

Summary: llz give ? for the security context of a file, which is wrong
Product: Red Hat Enterprise Linux 6 Reporter: Lingfei Kong <lkong>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 6.6CC: leiwang, linl, mbooth, ptoscano, rjones, virt-bugs, wshi, xchen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1152818 Environment:
Last Closed: 2016-08-23 18:03:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1152818    
Bug Blocks: 1301844    

Description Lingfei Kong 2014-10-15 03:58:55 UTC
+++ This bug was initially created as a clone of Bug #1152818 +++

Description of problem:
Enable SELinux support for the guest, try to use llz to get security context for files, but only get ? for all files in the guest.


Version-Release number of selected component (if applicable):
libguestfs-1.27.62-1.1.el7


How reproducible:
100%


Steps to Reproduce:
1. Get a rhel guest image: rhel.img
2. #guestfish -i -a rhel.img --selinux llz /


Actual results:
#guestfish -i -a rhel.img --selinux llz /
dr-xr-xr-x root root ?                                .
drwxr-xr-x root root ?                                ..
-rw------- root root ?                                .bash_history
dr-xr-xr-x root root ?                                bin
dr-xr-xr-x root root ?                                boot
drwxr-xr-x root root ?                                cgroup
drwxr-xr-x root root ?                                dev
drwxr-xr-x root root ?                                etc
.....


Expected results:
The selinux lable should not be ? but some thing like:
system_u:object_r:bin_t:s0       bin
system_u:object_r:boot_t:s0      boot
system_u:object_r:device_t:s0    dev
system_u:object_r:etc_t:s0       etc


Additional info:

Comment 3 Richard W.M. Jones 2016-08-23 18:03:31 UTC
The llz API has been marked deprecated upstream.  I'm closing
this low priority unfixable bug in RHEL 6.