Hi,
In our setup, we use adb shell to perform certain operations, where the shell runs with developer (root) privileges.
Since meta-selinux does not provide an adb domain, the SELinux policy for adb shell has been added via meta-openembedded. The relevant patch is available here:
https://github.com/openembedded/meta-openembedded/blob/master/meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted/0001-Added-sepolicy-for-adb-service.patch
On the target, the adb shell context is as follows:
adb shell id
uid=0(root) gid=0(root) groups=0(root) context=system_u:system_r:unconfined_t:s0
When running the mount command from this shell, we encounter the following SELinux error:
type=SELINUX_ERR msg=audit(44.591:158): op=security_compute_sid
invalid_context="system_u:system_r:unconfined_mount_t:s0"
scontext=system_u:system_r:unconfined_t:s0
tcontext=system_u:object_r:mount_exec_t:s0
tclass=process
This suggests that unconfined_mount_t is not permitted to run with the system role.
Could you please advise whether it is acceptable to allow unconfined_mount_t to run with the system role as well?
Specifically, is the following change to refpolicy considered acceptable?
https://github.com/openembedded/meta-openembedded/pull/1035/changes
Hi,
In our setup, we use
adb shellto perform certain operations, where the shell runs with developer (root) privileges.Since
meta-selinuxdoes not provide anadbdomain, the SELinux policy foradb shellhas been added viameta-openembedded. The relevant patch is available here:https://github.com/openembedded/meta-openembedded/blob/master/meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted/0001-Added-sepolicy-for-adb-service.patch
On the target, the
adb shellcontext is as follows:When running the
mountcommand from this shell, we encounter the following SELinux error:This suggests that
unconfined_mount_tis not permitted to run with thesystemrole.Could you please advise whether it is acceptable to allow
unconfined_mount_tto run with thesystemrole as well?Specifically, is the following change to refpolicy considered acceptable?
https://github.com/openembedded/meta-openembedded/pull/1035/changes