bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] restoring --selinux archive from non-MLS to MLS enabled system


From: Chris Hecker
Subject: [Bug-tar] restoring --selinux archive from non-MLS to MLS enabled system fails
Date: Mon, 30 Jul 2018 00:12:23 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0


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

[Prev in Thread] Current Thread [Next in Thread]