I did not find any documentation regarding override 'o' flag on nested subject. Looks that this mode is not applied here. Example with gentoo-hardened 4.1.7-r1:
(root:U:/bin/bash) denied access to hidden file /proc/meminfo by /bin/bash[bash:10885] uid/euid:0/0 gid/egid:0/0, parent /usr/sbin/cron[cron:10884] uid/euid:0/0 gid/egid:0/0
Here the subject is /bin/bash, which is configured as:
- Code: Select all
subject /usr/sbin/cron:/bin/bash o {
/ h
...
...
-CAP_ALL
bind disabled
connect disabled
}
However, 'o' flag is apparently ignored as when I grant access to /proc/meminfo to parent 'cron' subject, bash gets access as well. Also, not specifying default subject '/' with 'o' flagged subject does not report error on gradm check/reload. What would be the best way to achieve special ACL for bash run by cron process while not granting it access to same objects/CAPS as cron?