mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-21 06:45:29 -06:00
disable /dev/kmsg and /proc/kmsg
This commit is contained in:
parent
7583e1dac9
commit
9a6afbab3d
2 changed files with 12 additions and 4 deletions
|
|
@ -119,7 +119,3 @@ read-only ${HOME}/.xmonad
|
|||
# The user ~/bin directory can override commands such as ls
|
||||
read-only ${HOME}/bin
|
||||
|
||||
# syslog
|
||||
blacklist /dev/kmsg
|
||||
blacklist /proc/kmsg
|
||||
|
||||
|
|
|
|||
|
|
@ -604,6 +604,18 @@ void fs_proc_sys_dev_boot(void) {
|
|||
if (stat("/dev/port", &s) == 0) {
|
||||
disable_file(BLACKLIST_FILE, "/dev/port");
|
||||
}
|
||||
|
||||
if (getuid() != 0) {
|
||||
// disable /dev/kmsg
|
||||
if (stat("/dev/kmsg", &s) == 0) {
|
||||
disable_file(BLACKLIST_FILE, "/dev/kmsg");
|
||||
}
|
||||
|
||||
// disable /proc/kmsg
|
||||
if (stat("/proc/kmsg", &s) == 0) {
|
||||
disable_file(BLACKLIST_FILE, "/proc/kmsg");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// disable firejail configuration in /etc/firejail and in ~/.config/firejail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue