-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
refact: linux, chcon, bin_t #10293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refact: linux, chcon, bin_t #10293
Conversation
Signed-off-by: fufesou <linlong1266@gmail.com>
Investigating because this script will do nothing in the Fedora Atomic based systems. https://universal-blue.discourse.group/t/help-to-verify-this-selinux-related-scripts-on-atomic-systems-chcon-bin-t/5735/7 |
Update us if you get further results please. |
Check out the Fedora Discussion one. |
@xlionjuan Thank you for your helpful investigation. We've put another fix #10316
|
@xlionjuan could you help test? the nightly is ready. |
I think you still should put in |
I can not understand. Or could you locate |
mkdir -p "/var/opt" && ln -s "/var/opt" "/opt"
+ mkdir -p "/var/usrlocal" && ln -s "/var/usrlocal" "/usr/local" To my build, the For which directory should symlink to where: https://docs.fedoraproject.org/en-US/fedora-sericea/technical-information/ I'm not sure it is upstream bug or |
We do not care about container. |
So you have created the symlink, but rustdesk is failed to be moved into it. It's strange. Could you please also help confirm:
|
I mean, my whole operating system is a container |
This is my root filesystem looks like
If you're willing to, I can explain how bootable container works and why it may be the future of the Linux Desktop, we can continue this topic is Discord. |
But I agree not put in |
@xlionjuan Hi, |
Any difficulties that can't put in If you have no choices, I can sure |
No. I'm just not sure which location is better. I'll put another PR, then put rustdesk in |
If you want to ask more technical problems, you can ask siosm in that Fedora Discussion, his title is "Packaging Team", and also working on Fedora Atomic project. |
VSCodium and VSCode are in |
https://github.com/rustdesk/rustdesk/releases/nightly is |
Fix SELinux limits on Fedora.
#6116
#4267
#7107
#5458
#5098
#7164
#6301
Desc
Change the security context of
/usr/lib/rustdesk/rustdesk
fromlib_t
tobin_t
.Then the process security context will be
system_u:system_r:unconfined_service_t:s0
.Although the service spec uses
/usr/bin/rustdesk
and the security context of the soft symlink isbin_t
. The process actually uses the security context of/usr/lib/rustdesk/rustdesk
.All distros can apply the following changes. But we only do it for
rpm
packages for now.Because the other distros dose not support
chcon
well (or maybe SELinux) for now.The above code can also be applied to Ubuntu, openSUSE, Archlinux. But it takes no effect.
getenforce
is not included.ls -lZ /usr/lib/rustdesk/rustdesk
results no security context-rwxr-xr-x 1 root root ? 19184 Sep 20 14:10 /usr/lib/rustdesk//rustdesk
chcon -t bin_t /usr/lib/rustdesk/rustdesk
results errors.chcon: can't apply partial context to unlabeled file '/usr/lib/rustdesk/rustdesk'
chcon: failed to get security context of '/usr/lib/rustdesk/rustdesk': Operation not supported
This documentation may no longer be needed https://rustdesk.com/docs/en/client/linux/selinux/.
Tests
deb
package with the adding code inpostinst
. Installation is done, nothing changes.Refs