Hi, I made some tar archives with --selinux on centos5, which does not
seem to have MLS enabled, so files have no selinux range (the :s0 part
at the end) in the security context.  Trying to restore these archives
on centos7, which does have MLS enabled, errors:

tar-1.30: setfileconat: Cannot set SELinux context
'system_u:object_r:mailman_data_t' for file 'data': Invalid argument

(I modified the error for my tar 1.30 build to display the
security_context_t in the error statement here.)

It makes these archives basically broken, whereas I think tar could have
a parameter like --selinux-range=s0 and append it before calling
setfileconat()...I could make this patch if people are interested.

Thanks,
Chris

Reply via email to