[augeas-devel] [PATCH] tests: extract SELinux context more portably

David Lutterkort lutter at redhat.com
Thu Jul 23 09:16:57 UTC 2009


On Tue, 2009-07-21 at 15:43 +0200, Jim Meyering wrote:
> Hi David,
> 
> I found that test-preserve.sh would fail on an F11 system
> with SELinux in enforcing mode.
> That happened because ls -lZ would print this:
> 
> -rw-r--r--. root root system_u:object_r:net_conf_t:s0  /etc/hosts
> 
> And in that case, the context string is the 4th space-delimited token,
> and not the 5th.  Perhaps you have disabled SELinux and have a space
> in place of the "."?  Then the cut...-f 5 would work.  You might also
> have to have a slightly outdated version of ls.

How about a slightly outdated version of Fedora (F10) ;)

Thanks for the patch - ACK and committed.

David





More information about the augeas-devel mailing list