Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SELinux: Use kernel_read_fs_sysctls interface instead custom policy #1923

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions unix/vncserver/selinux/vncsession.te
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@ allow vnc_session_t self:capability { chown dac_override dac_read_search fowner
allow vnc_session_t self:process { getcap setexec setrlimit setsched };
allow vnc_session_t self:fifo_file rw_fifo_file_perms;

optional_policy(`
gen_require(`
type sysctl_fs_t;
')
allow vnc_session_t sysctl_fs_t:dir search;
allow vnc_session_t sysctl_fs_t:file { getattr open read };
')

allow vnc_session_t vnc_session_var_run_t:file manage_file_perms;
files_pid_filetrans(vnc_session_t, vnc_session_var_run_t, file)

# Allow access to /proc/sys/fs/nr_open
# Needed when the nofile limit is set to unlimited.
kernel_read_fs_sysctls(vnc_session_t)

# Allowed to create ~/.local
optional_policy(`
gnome_filetrans_home_content(vnc_session_t)
Expand Down
Loading