diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/lldpd/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/lldpd/files')
-rw-r--r-- | net-misc/lldpd/files/lldpd-0.7.11-zsh-completion-dir.patch | 7 | ||||
-rw-r--r-- | net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch | 12 | ||||
-rw-r--r-- | net-misc/lldpd/files/lldpd-0.9-seccomp-missing-syscalls.patch | 17 | ||||
-rw-r--r-- | net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-mprotect.patch | 12 | ||||
-rw-r--r-- | net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-socket-ops.patch | 13 | ||||
-rw-r--r-- | net-misc/lldpd/files/lldpd-confd-1 | 5 | ||||
-rw-r--r-- | net-misc/lldpd/files/lldpd-initd-5 | 20 | ||||
-rw-r--r-- | net-misc/lldpd/files/lldpd.conf | 1 | ||||
-rw-r--r-- | net-misc/lldpd/files/lldpd.service | 12 | ||||
-rw-r--r-- | net-misc/lldpd/files/tmpfilesd | 1 |
10 files changed, 100 insertions, 0 deletions
diff --git a/net-misc/lldpd/files/lldpd-0.7.11-zsh-completion-dir.patch b/net-misc/lldpd/files/lldpd-0.7.11-zsh-completion-dir.patch new file mode 100644 index 000000000000..ff20d9aabc75 --- /dev/null +++ b/net-misc/lldpd/files/lldpd-0.7.11-zsh-completion-dir.patch @@ -0,0 +1,7 @@ +diff --git a/src/client/Makefile.am b/src/client/Makefile.am +index 454bdeb..fd391fd 100644 +--- a/src/client/Makefile.am ++++ b/src/client/Makefile.am +@@ -46 +46 @@ dist_bashcompletion_DATA = lldpcli.bash-completion +-zshcompletiondir = $(datadir)/zsh/vendor-completions ++zshcompletiondir = $(datadir)/zsh/site-functions diff --git a/net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch b/net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch new file mode 100644 index 000000000000..55ed4b6f8e38 --- /dev/null +++ b/net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch @@ -0,0 +1,12 @@ +diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c +index 1905236..7d911bc 100644 +--- a/src/daemon/priv-seccomp.c ++++ b/src/daemon/priv-seccomp.c +@@ -161,6 +161,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(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 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendto), 0)) < 0 || diff --git a/net-misc/lldpd/files/lldpd-0.9-seccomp-missing-syscalls.patch b/net-misc/lldpd/files/lldpd-0.9-seccomp-missing-syscalls.patch new file mode 100644 index 000000000000..183306a90482 --- /dev/null +++ b/net-misc/lldpd/files/lldpd-0.9-seccomp-missing-syscalls.patch @@ -0,0 +1,17 @@ +diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c +index bccd378..4f9e6e6 100644 +--- a/src/daemon/priv-seccomp.c ++++ b/src/daemon/priv-seccomp.c +@@ -148,10 +148,12 @@ 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(fcntl), 0)) < 0 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(kill), 0)) < 0 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(socket), 0)) < 0 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(bind), 0)) < 0 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(setsockopt), 0)) < 0 || ++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(getsockname), 0)) < 0 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(uname), 0)) < 0 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(unlink), 0)) < 0 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(ioctl), 0)) < 0 || diff --git a/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-mprotect.patch b/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-mprotect.patch new file mode 100644 index 000000000000..dbb4c79ddf7c --- /dev/null +++ b/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-mprotect.patch @@ -0,0 +1,12 @@ +diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c +index 4f9e6e6..97f4233 100644 +--- a/src/daemon/priv-seccomp.c ++++ b/src/daemon/priv-seccomp.c +@@ -166,6 +166,7 @@ priv_seccomp_init(int remote, int child) + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(poll), 0)) < 0 || + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(recvmsg), 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 || + /* 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 || diff --git a/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-socket-ops.patch b/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-socket-ops.patch new file mode 100644 index 000000000000..987ef9a515c5 --- /dev/null +++ b/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-socket-ops.patch @@ -0,0 +1,13 @@ +diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c +index 97f4233..36184cd 100644 +--- a/src/daemon/priv-seccomp.c ++++ b/src/daemon/priv-seccomp.c +@@ -167,6 +167,8 @@ priv_seccomp_init(int remote, int child) + (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(recvmsg), 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 || + /* 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 || diff --git a/net-misc/lldpd/files/lldpd-confd-1 b/net-misc/lldpd/files/lldpd-confd-1 new file mode 100644 index 000000000000..f719a1381d80 --- /dev/null +++ b/net-misc/lldpd/files/lldpd-confd-1 @@ -0,0 +1,5 @@ +# /etc/conf.d/lldpd: config file for /etc/init.d/lldpd + +# see man page for lldpd or run `lldpd -h` +# for valid cmdline options +#LLDPD_OPTS="" diff --git a/net-misc/lldpd/files/lldpd-initd-5 b/net-misc/lldpd/files/lldpd-initd-5 new file mode 100644 index 000000000000..ab0fc20c769c --- /dev/null +++ b/net-misc/lldpd/files/lldpd-initd-5 @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +name=lldpd +pidfile=/run/lldpd.pid +command=/usr/sbin/lldpd +retry="TERM/10/KILL/5" +command_args="${LLDPD_OPTS}" +start_stop_daemon_args="--wait 300" + +depend() { + use net +} + +start_pre() { + checkpath --directory /run/lldpd -o lldpd -m 0700 +} + +# vim:ft=gentoo-init-d:noet:ts=4:sts=4:sw=4: diff --git a/net-misc/lldpd/files/lldpd.conf b/net-misc/lldpd/files/lldpd.conf new file mode 100644 index 000000000000..09233b720826 --- /dev/null +++ b/net-misc/lldpd/files/lldpd.conf @@ -0,0 +1 @@ +# empty placeholder configuration file for lldpd diff --git a/net-misc/lldpd/files/lldpd.service b/net-misc/lldpd/files/lldpd.service new file mode 100644 index 000000000000..c5be8a830021 --- /dev/null +++ b/net-misc/lldpd/files/lldpd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Link Layer Discovery Protocol daemon +After=syslog.target +After=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/sbin/lldpd + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/lldpd/files/tmpfilesd b/net-misc/lldpd/files/tmpfilesd new file mode 100644 index 000000000000..5e3af548a581 --- /dev/null +++ b/net-misc/lldpd/files/tmpfilesd @@ -0,0 +1 @@ +d /run/lldpd 0700 lldpd lldpd - |