Skip to contentSkip to conversation

Allow ping to get/set capabilities

PATCH New Sven Vermeulen 2 participants 2 messages Sep 25, 2013 – Sep 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow ping to get/set capabilities

When ping is installed with capabilities instead of being marked setuid, then the ping_t domain needs to be allowed to getcap/setcap.

---
 policy/modules/admin/netutils.te | 2 ++
 1 file changed, 2 insertions(+)
policy/modules/admin/netutils.te +2 -0
index 557da97..cfe036a 100644
@@ -106,6 +106,8 @@ optional_policy(`
 #
 
 allow ping_t self:capability { setuid net_raw };
+# When ping is installed with capabilities instead of setuid
+allow ping_t self:process { getcap setcap };
 dontaudit ping_t self:capability sys_tty_config;
 allow ping_t self:tcp_socket create_socket_perms;
 allow ping_t self:rawip_socket { create ioctl read write bind getopt setopt };
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 1/1 Allow ping to get/set capabilities

Quoted 14 lines · Sven Vermeulen

When ping is installed with capabilities instead of being marked setuid, then the ping_t domain needs to be allowed to getcap/setcap.

---
 policy/modules/admin/netutils.te | 2 ++
 1 file changed, 2 insertions(+)
policy/modules/admin/netutils.te +0 -0
index 557da97..cfe036a 100644

policy/modules/admin/netutils.te optional_policy(` · line 113

Quoted 8 lines
policy/modules/admin/netutils.te +2 -0
@@ -106,6 +106,8 @@ optional_policy(`
 #
 
 allow ping_t self:capability { setuid net_raw };
+# When ping is installed with capabilities instead of setuid
+allow ping_t self:process { getcap setcap };
 dontaudit ping_t self:capability sys_tty_config;
 allow ping_t self:tcp_socket create_socket_perms;
 allow ping_t self:rawip_socket { create ioctl read write bind getopt setopt };

Merged.

--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com