systemd reboot
# cat /lib/systemd/system/reboot.target cat: /lib/systemd/system/reboot.target: Permission denied # systemctl reboot ... it reboots
Should systemd be doing some sort of access check on reboot.target?
Signature · 2 lines
My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
Quoted 6 lines · Russell Coker
# cat /lib/systemd/system/reboot.target cat: /lib/systemd/system/reboot.target: Permission denied # systemctl reboot ... it rebootsShould systemd be doing some sort of access check on reboot.target?
I don't think so. The access check is on systemd-reboot.service i believe.
Quoted 7 lines
Signature · 3 lines
-- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift
Quoted 6 lines · Russell Coker
# cat /lib/systemd/system/reboot.target cat: /lib/systemd/system/reboot.target: Permission denied # systemctl reboot ... it rebootsShould systemd be doing some sort of access check on reboot.target?
I was wrong. It is doing an acccess check on reboot.target
I tried it out here: https://www.youtube.com/watch?v=YUATkv6R6Ys&feature=youtu.be
Quoted 7 lines
Signature · 3 lines
-- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift
Quoted 6 lines · AEDT Dominick Grift
Quoted 5 lines · Russell Coker
# cat /lib/systemd/system/reboot.target cat: /lib/systemd/system/reboot.target: Permission denied # systemctl reboot ... it reboots
Quoted 6 lines
Quoted 1 line
Should systemd be doing some sort of access check on reboot.target?
I was wrong. It is doing an acccess check on reboot.target
I tried it out here:
https://www.youtube.com/watch?v=YUATkv6R6Ys&feature=youtu.be
Thanks for the pointer, I put in an auditallow rule and got the following when user_t runs "systemctl reboot". It's doing the permission check on systemd- logind.
Do you have any idea of where I should look for the cause of this?
type=USER_AVC msg=audit(1585309343.652:285): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: granted { start } for auid=n/a uid=0 gid=0 path="/lib/systemd/system/reboot.target" cmdline="/ lib/systemd/systemd-logind" scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:power_unit_t:s0 tclass=service exe="/usr/lib/ systemd/systemd" sauid=0 hostname=? addr=? terminal=?' type=USER_AVC msg=audit(1585309343.660:287): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: granted { start } for auid=n/a uid=0 gid=0 path="/lib/systemd/system/reboot.target" cmdline="/ lib/systemd/systemd-logind" scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:power_unit_t:s0 tclass=service exe="/usr/lib/ systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Signature · 2 lines
My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/