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:
Moving this bug upstream as it is unlikely to be encountered by RHEL customers.
'llz' is mostly a debugging API, which gives human-readable output. If you want to find out the real attributes (including SELinux ones) of a file/directory, then 'lgetxattrs' is a better API for this. Also, since libguestfs 1.33.43, 'llz' (with most of the other SELinux APIs) is deprecated: https://github.com/libguestfs/libguestfs/commit/35bac3a6501354e4a3805877d950e741429f169b IMHO this should be considered NOTABUG.
<rwmjones> pino|work: yeah I'd say close 1152818 as NOTABUG <rwmjones> (the API it never worked) Confirmed with Rich, so closing it.