mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-12 17:15:00 +00:00
0f99a3126c
"sestatus -v" uses /proc/$PID/exe symbolic link in order to find the context of processes present in /etc/sestatus.conf. For example, this file includes "/usr/sbin/sshd". On Arch Linux, /bin, /sbin and /usr/sbin are symbolic links to /usr/bin, so sshd process is seen as "/usr/bin/sshd" instead of "/usr/sbin/sshd". This causes "sestatus -v" to show nothing in "Process contexts:" for sshd, agetty, etc. Use realpath() to resolve any symlink components in program paths defined in /etc/sestatus.conf. This makes "sestatus -v" show the expected result: Process contexts: Current context: sysadm_u:sysadm_r:sysadm_t Init context: system_u:system_r:init_t /sbin/agetty system_u:system_r:getty_t /usr/sbin/sshd system_u:system_r:sshd_t Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org> |
||
---|---|---|
.. | ||
Makefile | ||
sestatus.8 | ||
sestatus.c | ||
sestatus.conf | ||
sestatus.conf.5 |