Skip to content

Commit 5b13e7f

Browse files
authored
Merge pull request #859 from dsugar100/fapolicyd_watch_network_namespace
Allow fapolicyd to watch /run/netns
2 parents f6c4144 + fad6401 commit 5b13e7f

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

policy/modules/admin/fapolicyd.te

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ fs_watch_all_fs(fapolicyd_t)
8484
logging_log_filetrans(fapolicyd_t, fapolicyd_log_t, file)
8585
logging_send_syslog_msg(fapolicyd_t)
8686

87+
sysnet_watch_sb_netns_dirs(fapolicyd_t)
88+
sysnet_watch_with_perm_netns_dirs(fapolicyd_t)
89+
8790
fapolicyd_mmap_read_config_files(fapolicyd_t)
8891

8992
optional_policy(`

policy/modules/system/sysnetwork.if

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,42 @@ interface(`sysnet_create_netns_dirs',`
793793
files_runtime_filetrans($1, ifconfig_runtime_t, dir, "netns")
794794
')
795795

796+
########################################
797+
## <summary>
798+
## Watch the /run/netns directory for superblock changes
799+
## </summary>
800+
## <param name="domain">
801+
## <summary>
802+
## Domain allowed access.
803+
## </summary>
804+
## </param>
805+
#
806+
interface(`sysnet_watch_sb_netns_dirs',`
807+
gen_require(`
808+
type ifconfig_runtime_t;
809+
')
810+
811+
allow $1 ifconfig_runtime_t:dir watch_sb;
812+
')
813+
814+
########################################
815+
## <summary>
816+
## Watch the /run/netns directory with fanofiy masks
817+
## </summary>
818+
## <param name="domain">
819+
## <summary>
820+
## Domain allowed access.
821+
## </summary>
822+
## </param>
823+
#
824+
interface(`sysnet_watch_with_perm_netns_dirs',`
825+
gen_require(`
826+
type ifconfig_runtime_t;
827+
')
828+
829+
allow $1 ifconfig_runtime_t:dir watch_with_perm;
830+
')
831+
796832
########################################
797833
## <summary>
798834
## Create an object in the /run/netns

0 commit comments

Comments
 (0)