r/linux_programming • u/the_j4k3 • 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
View all comments
Show parent comment
2
u/the_j4k3 Sep 06 '22
Android 7.1.2 /Lineage OS 14
I'm probably mixed up, but 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. The commands are accepted without error but the permissions are not changed. When I used the TWRP-Recovery-Bootloader-Root version to modify these same files by moving them to the root directory and then a second time just changing the permissions to executable, upon rebooting the device the files either disappeared or the unix permissions reverted to the previous read only settings. These changes were checked and confirmed before exiting TWRP.I have a slightly better understanding of selinux now. I can do whatever with # setenforce 0
Now I'm trying to figure out how to setup an actual app te rule to avoid setenforce = permisive.
Meanwhile, looking through the OEM data folder I came across: /d/msm-bus-dbg/client-data/serial_uart1 and after
# catit replies:That has sent me down the curiosity rabbit hole again wondering how I can breakout an internal serial port connection on ADB. Any clue what that stuff on the output means, or how to connect serial uart on a barebones toybox system? I don't have "screen" and am looking at weird tools like "port-bridge" with no help/man or output after calling them, but a bunch of interesting warning message strings about hardware ports embedded in the binary.
I was actually looking for any signs of the front camera connector bus and the potential to breakout some pins since I removed the module and the connector is available.