You are not logged in.
hello! I'm asking for help. I needed tar to work with files where I need to save the selinux context. Using the tar command with the --selinux option, I get the following error:
tar: SELinux support is not available
I thought I could solve the problem if I install SELinux support. Using the step-by-step guide on the Wiki, I installed it using github, added lsm=...selinux to the kernel parameters...
but after restarting ArchLinux tar it still gives this error despite the fact that sestatus shows that SELinux = enabled. Please help me, what needs to be done so that tar can work with the selinux context?
Offline
Mod note: moving to AUR Issues
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
This is not kernel or configuration related. ArchLinux tar is built without selinux support (HAVE_SELINUX_SELINUX_H = 0).
If it were supported, the string "SELinux support is not available" would not appear in the binary at all (filtered by preprocessor in src/xattrs.c) and instead the error message "Cannot set SELinux context for file" would appear.
If you `strings /bin/tar | grep -i selinux` and compare ArchLinux vs. Debian (for example), Debian tar has the selinux support while Arch does not.
Offline
I understand you, thank you very much for the clarification. In that case, can you tell me how to build tar with Selinux support? or is it impossible on Arch at all?
Offline
Online
thank you! but the fact is that this link describes a technique for compiling a package yourself. And I need more than just that, I need to know how to compile so that SELinux is supported.
Offline
By compiling the package yourself while having the selinux header (selinux userspace stuff) installed - there seems no special config flag and the definition very much sounds like that's what's tested to enable the feature.
Online