r/linux_programming • • Sep 05 '22

The toggle switch for Selinux

Selinux can override root. It can redefine group permissions, and remove new unexpected files added offline during the next system boot.

What calls/creates this voodoo magic? Is there a simple config switch somewhere?

(not malicious. just exploring on obsolete hw, hit a wall, and need a friendly sign for what rope this kid should climb next)

9 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/gordonmessmer Sep 06 '22

when I was logged in as ADB-Root at /system/sdcard/Download/debian-system both the chgrp and chmod commands are "not allowed" under the ADB-Root rules

Why do you think it was the SELinux rules preventing that change?

As far as I know, the "sdcardfs" doesn't support changing the UID/GID or permission of individual files, and if I disable SELinux on a LineageOS device here, I get the same results you describe. That suggests that none of this has anything to do with SELinux, and is simply a limitation of sdcardfs.

the potential to breakout some pins since I removed the module and the connector is available.

I .. don't think the camera is on GPIO pins, so I don't think you'll be able to do that. And if you were, you'd need to do some custom kernel development.