Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831115 - net-misc/kea: dhcp4 and dhcp6 daemons missing caps
Summary: net-misc/kea: dhcp4 and dhcp6 daemons missing caps
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-13 08:45 UTC by Alexey Shvetsov
Modified: 2022-05-18 12:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Shvetsov archtester gentoo-dev 2022-01-13 08:45:03 UTC
When using systemd for strting kea-dhcp4-server or kea-dhcp6-server daemons uses dhcp user to start (so efficently they miss cap_net_raw and cap_net_bind_service)  and simply cannot start!

solutions is to add this two caps

setcap cap_net_bind_service,cap_net_raw=+ep   /usr/sbin/kea-dhcp4
setcap cap_net_bind_service,cap_net_raw=+ep   /usr/sbin/kea-dhcp6

Reproducible: Always
Comment 1 Alexey Shvetsov archtester gentoo-dev 2022-03-12 21:04:59 UTC
Any progress on this? Bug still valid 

Without caps:

Mar 12 20:56:50 ipservice-1 kea-dhcp4[548]: WARN  [kea-dhcp4.dhcpsrv.140576483642368] DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: failed to open socket on interface enp0s3, reason: fai>
Mar 12 20:56:50 ipservice-1 kea-dhcp4[548]: WARN  [kea-dhcp4.dhcpsrv.140576483642368] DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: failed to open socket on interface enp0s5, reason: fai>
Mar 12 20:56:50 ipservice-1 kea-dhcp4[548]: WARN  [kea-dhcp4.dhcpsrv.140576483642368] DHCPSRV_NO_SOCKETS_OPEN no interface configured to listen to DHCP traffic
Mar 12 20:56:50 ipservice-1 kea-dhcp4[548]: WARN  [kea-dhcp4.dhcp4.140576483642368] DHCP4_MULTI_THREADING_INFO enabled: no, number of threads: 0, queue size: 0

When I enabled caps:

# setcap cap_net_bind_service,cap_net_raw=+ep  /usr/sbin/kea-dhcp4

Mar 12 21:00:25 ipservice-1 kea-dhcp4[579]: INFO  [kea-dhcp4.dhcpsrv.140579049286656] DHCPSRV_CFGMGR_ADD_IFACE listening on interface enp0s3
Mar 12 21:00:25 ipservice-1 kea-dhcp4[579]: INFO  [kea-dhcp4.dhcpsrv.140579049286656] DHCPSRV_CFGMGR_ADD_IFACE listening on interface enp0s5
Mar 12 21:00:25 ipservice-1 kea-dhcp4[579]: INFO  [kea-dhcp4.dhcpsrv.140579049286656] DHCPSRV_CFGMGR_SOCKET_TYPE_DEFAULT "dhcp-socket-type" not specified , using default socket type raw
Mar 12 21:00:25 ipservice-1 kea-dhcp4[579]: INFO  [kea-dhcp4.dhcpsrv.140579049286656] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 10.22.0.0/23 with params: t1=>
Mar 12 21:00:25 ipservice-1 kea-dhcp4[579]: INFO  [kea-dhcp4.dhcpsrv.140579049286656] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 10.24.0.0/23 with param
Comment 2 Larry the Git Cow gentoo-dev 2022-05-18 12:27:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7d3e9c71823164d3eb6f0ffe3470043be4be7ba

commit c7d3e9c71823164d3eb6f0ffe3470043be4be7ba
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2022-05-18 12:09:59 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2022-05-18 12:27:48 +0000

    net-misc/kea: Bump to version 2.0.2
    
    Removed old
    
    - Bump to EAPI-8
    - Install message-compiler (#845327)
    - Add missing caps (831115)
    
    Closes: https://bugs.gentoo.org/830059
    Closes: https://bugs.gentoo.org/831115
    Closes: https://bugs.gentoo.org/845327
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 net-misc/kea/Manifest                              |  2 +-
 .../kea/{kea-1.9.11.ebuild => kea-2.0.2.ebuild}    | 32 ++++++++++++++++------
 net-misc/kea/metadata.xml                          |  1 +
 3 files changed, 26 insertions(+), 9 deletions(-)