Skip to contentSkip to conversation

Add capability for port in restricted range.

PATCH Applied Michael Johnson 2 participants 2 messages Jun 29, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add capability for port in restricted range.

This fixes an issue where the udp port was not being opened due to a permission denied error. The result of this was the dhcp client would fail to send the renewal request and so the dhcp lease would expire.

The addition of the CAP_NET_BIND_SERVICE capability allows the service to open sockets in the restricted port range (<1024) which is required for dhcp.

---
 src/iwd.service.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/iwd.service.in +1 -1
index 96e4abac..ab0a5da7 100644
@@ -11,7 +11,7 @@ ExecStart=@libexecdir@/iwd
 NotifyAccess=main
 LimitNPROC=1
 Restart=on-failure
-CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE
 PrivateTmp=true
 NoNewPrivileges=true
 DevicePolicy=closed
Signature · 1 line
2.25.1
#1 lore raw

Hi Michael,

Quoted 10 lines · Michael Johnson

This fixes an issue where the udp port was not being opened due to a permission denied error. The result of this was the dhcp client would fail to send the renewal request and so the dhcp lease would expire.

The addition of the CAP_NET_BIND_SERVICE capability allows the service to open sockets in the restricted port range (<1024) which is required for dhcp.

---
  src/iwd.service.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis