DHCP client's hooks create /run/dhcpc directory
PATCH v2 1/1 DHCP client's hooks create /run/dhcpc directory
This directory contains the working files for updating network-related files (like resolv.conf for name servers) before they are copied to the fixed location. Although already in use previously, this location (/var/run/dhcpc or /var/run/dhcpcd) was statically defined on the system.
With the introduction of /run and systems having /var/run -> /run, this is now a dynamically created directory by dhcpc_t. Hence, the policy is enhanced allowing dhcpc_t to create dhcpc_var_run_t directories, and include a file transition for directories created in the var_run_t location(s).
Changes since v1
----------------
- Use create_dirs_pattern instead of manage_dirs_pattern
--- policy/modules/system/sysnetwork.te | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
policy/modules/system/sysnetwork.te +2 -1
@@ -65,7 +65,8 @@ filetrans_pattern(dhcpc_t, dhcp_state_t, dhcpc_state_t, file) # create pid file manage_files_pattern(dhcpc_t, dhcpc_var_run_t, dhcpc_var_run_t) -files_pid_filetrans(dhcpc_t, dhcpc_var_run_t, file) +create_dirs_pattern(dhcpc_t, dhcpc_var_run_t, dhcpc_var_run_t) +files_pid_filetrans(dhcpc_t, dhcpc_var_run_t, { file dir }) # Allow read/write to /etc/resolv.conf and /etc/ntp.conf. Note that any files # in /etc created by dhcpcd will be labelled net_conf_t.
Signature · 1 line
1.7.8.6
PATCH v2 1/1 DHCP client's hooks create /run/dhcpc directory
Quoted 9 lines · Sven Vermeulen
This directory contains the working files for updating network-related files (like resolv.conf for name servers) before they are copied to the fixed location. Although already in use previously, this location (
/var/run/dhcpcor/var/run/dhcpcd) was statically defined on the system.With the introduction of /run and systems having
/var/run-> /run, this is now a dynamically created directory bydhcpc_t. Hence, the policy is enhanced allowingdhcpc_tto createdhcpc_var_run_tdirectories, and include a file transition for directories created in thevar_run_tlocation(s).
Merged.
Quoted 24 lines
Changes since v1
----------------
- Usecreate_dirs_patterninstead ofmanage_dirs_patternSigned-off-by Sven Vermeulen <[email protected]>--- policy/modules/system/sysnetwork.te | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)policy/modules/system/sysnetwork.te +2
-1@@ -65,7 +65,8 @@ filetrans_pattern(dhcpc_t, dhcp_state_t, dhcpc_state_t, file) # create pid file manage_files_pattern(dhcpc_t, dhcpc_var_run_t, dhcpc_var_run_t) -files_pid_filetrans(dhcpc_t, dhcpc_var_run_t, file) +create_dirs_pattern(dhcpc_t, dhcpc_var_run_t, dhcpc_var_run_t) +files_pid_filetrans(dhcpc_t, dhcpc_var_run_t, { file dir }) # Allow read/write to /etc/resolv.conf and /etc/ntp.conf. Note that any files # in /etc created by dhcpcd will be labelled net_conf_t.
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC www.tresys.com | oss.tresys.com