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

Allow fapolicyd to watch /run/netns #859

Merged
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions policy/modules/admin/fapolicyd.te
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ fs_watch_all_fs(fapolicyd_t)
logging_log_filetrans(fapolicyd_t, fapolicyd_log_t, file)
logging_send_syslog_msg(fapolicyd_t)

sysnet_watch_sb_netns_dirs(fapolicyd_t)
sysnet_watch_with_perm_netns_dirs(fapolicyd_t)

fapolicyd_mmap_read_config_files(fapolicyd_t)

optional_policy(`
Expand Down
36 changes: 36 additions & 0 deletions policy/modules/system/sysnetwork.if
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,42 @@ interface(`sysnet_create_netns_dirs',`
files_runtime_filetrans($1, ifconfig_runtime_t, dir, "netns")
')

########################################
## <summary>
## Watch the /run/netns directory for superblock changes
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`sysnet_watch_sb_netns_dirs',`
gen_require(`
type ifconfig_runtime_t;
')

allow $1 ifconfig_runtime_t:dir watch_sb;
')

########################################
## <summary>
## Watch the /run/netns directory with fanofiy masks
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`sysnet_watch_with_perm_netns_dirs',`
gen_require(`
type ifconfig_runtime_t;
')

allow $1 ifconfig_runtime_t:dir watch_with_perm;
')

########################################
## <summary>
## Create an object in the /run/netns
Expand Down
Loading