restoring SELinux context using STAR fails

Klaas klaas at klaas.nl
Tue Jun 27 17:37:08 UTC 2006


Hello, 

I am unable to use star to restore SELinux file
contexts on FC5 (from an offline booted generic
selinux-turned-off miniboot disk; much like rescue mode).

I use star with -acl, -H=exustar etc. etc. from the FAQ.

The problem is; most of the contexts *do* get restored
- except for the symbolic links. Most notably,
files in /lib get selinux context system_u:object_u:lib_t
but the symlinks (and there are a few in /lib since
well you know) get system_u:object_u:file_t
Now linux breaks. If I run a fixfiles ('relabel')
I can see the symlinks are meant to have lib_t too
(and things work again).

The command line I use for extraction is
star -x -p -acl -xattr -H=exustar -z -C=/lib -f root.tgz

When I restore the very same archive on a running Linux
(selinux=permissive), restoring (to /tmp/lib) *does* give
me all the right contexts (that is; also for the symlinks).

So well this does look a lot like
http://www.redhat.com/archives/rhl-list/2006-April/msg06611.html

but that one is about not getting *any* context restored;
I am only asking for the symbolic link contexts...

Regards,
Klaas













More information about the redhat-list mailing list