--- /dev/null
+diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c
+index 5a6e2ae..5cef36f 100644
+--- a/src/daemon/priv-seccomp.c
++++ b/src/daemon/priv-seccomp.c
+@@ -148,6 +148,7 @@ priv_seccomp_init(int remote, int child)
+ if ((rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 0)) < 0 || /* write needed for */
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 0)) < 0 ||
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(lseek), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(openat), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(lseek), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(fcntl), 0)) < 0 ||
+@@ -163,6 +164,7 @@ priv_seccomp_init(int remote, int child)
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendmmsg), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(wait4), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(stat), 0)) < 0 ||
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(brk), 0)) < 0 || /* brk needed for newer libc */
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(getpid), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(rt_sigreturn), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(close), 0)) < 0 ||
+@@ -172,6 +174,10 @@ priv_seccomp_init(int remote, int child)
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(recvfrom), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(readv), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mprotect), 0)) < 0 ||
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendmmsg), 0)) < 0 ||
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(recvfrom), 0)) < 0 ||
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(clock_gettime), 0)) < 0 ||
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(gettimeofday), 0)) < 0 ||
+ /* The following are for resolving addresses */
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(munmap), 0)) < 0 ||
EAPI=7
-inherit eutils user systemd bash-completion-r1 autotools
+inherit systemd bash-completion-r1 autotools
DESCRIPTION="Implementation of IEEE 802.1ab (LLDP)"
HOMEPAGE="https://vincentbernat.github.com/lldpd/"
SRC_URI="http://media.luffy.cx/files/${PN}/${P}.tar.gz"
LICENSE="ISC"
-SLOT="0"
+SLOT="0/4.8.0"
KEYWORDS="~amd64 ~x86"
IUSE="cdp doc +dot1 +dot3 edp fdp graph +lldpmed old-kernel sanitizers
seccomp sonmp snmp static-libs test readline xml zsh-completion"
RESTRICT="!test? ( test )"
-RDEPEND="dev-libs/libbsd
+RDEPEND="
+ acct-group/lldpd
+ acct-user/lldpd
+ dev-libs/libbsd
>=dev-libs/libevent-2.0.5:=
sys-libs/readline:0=
+ seccomp? ( sys-libs/libseccomp:= )
snmp? ( net-analyzer/net-snmp[extensible(+)] )
xml? ( dev-libs/libxml2:= )
- seccomp? ( sys-libs/libseccomp:= )
- zsh-completion? ( app-shells/zsh )"
+ zsh-completion? ( app-shells/zsh )
+"
DEPEND="${RDEPEND}
- test? ( dev-libs/check )"
+ test? ( dev-libs/check )
+"
BDEPEND="virtual/pkgconfig
doc? (
graph? ( app-doc/doxygen[dot] )
!graph? ( app-doc/doxygen )
- )"
+ )
+"
REQUIRED_USE="graph? ( doc )"
PATCHES=(
- "${FILESDIR}/lldpd-0.9.5-seccomp-add-socket-ops.patch"
- "${FILESDIR}/lldpd-1.0.1-seccomp-add-brk.patch"
- "${FILESDIR}/lldpd-1.0.2-seccomp-add-misc.patch"
+ "${FILESDIR}/lldpd-1.0.5-seccomp.patch"
)
-pkg_setup() {
- ebegin "Creating lldpd user and group"
- enewgroup ${PN}
- enewuser ${PN} -1 -1 -1 ${PN}
- eend $?
-}
-
src_prepare() {
default