]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Revert "priv: on Linux, when monitor dies, kill child"
authorVincent Bernat <vincent@bernat.im>
Wed, 18 Mar 2015 14:42:24 +0000 (15:42 +0100)
committerVincent Bernat <vincent@bernat.im>
Wed, 18 Mar 2015 14:42:24 +0000 (15:42 +0100)
This reverts commit 4747e964096a1b490de062460608805c46f0cfd2. This
commit is now useless due to the previous (more portable) commits. It is
harmless but also unneeded.

src/daemon/lldpd.h
src/daemon/priv-bsd.c
src/daemon/priv-linux.c
src/daemon/priv.c

index c93128ad2f85da2067b142fd4a705e8064deaade..4c10aa1f174b17a368fc0acf04927627dcd03814 100644 (file)
@@ -222,7 +222,6 @@ client_handle_client(struct lldpd *cfg,
 
 /* priv.c */
 void    priv_init(const char*, int, uid_t, gid_t);
-void    priv_init_os(void);
 void    priv_wait(void);
 void    priv_ctl_cleanup(const char *ctlname);
 char           *priv_gethostname(void);
index 3b13b757e203c3573c7ca0b46d0c773535cf97e3..f32f990cb15269d1da5b776a86971512691725d3 100644 (file)
 #include <errno.h>
 #include <string.h>
 
-void
-priv_init_os()
-{
-}
-
 int
 asroot_iface_init_os(int ifindex, char *name, int *fd)
 {
index cc14087920dc9905df66a39b4d6af559a5aab536..abcec86ce4693852e692c99ab8b9eb0f49e5dd35 100644 (file)
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <signal.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <regex.h>
 #include <sys/ioctl.h>
-#include <sys/prctl.h>
 #include <netpacket/packet.h> /* For sockaddr_ll */
 #include <linux/filter.h>     /* For BPF filtering */
 #include <linux/ethtool.h>
 #include <linux/sockios.h>
 
-void
-priv_init_os()
-{
-       if (prctl(PR_SET_PDEATHSIG, SIGTERM) == -1)
-               log_warn("privsep", "unable to setup parent death signal");
-}
-
 /* Proxy for open */
 int
 priv_open(char *file)
index 3714735883f5a7f6bc59062eb2b684676d651aff..7b3c5eca93f6a3c20fb08afd67486d219ba9a13f 100644 (file)
@@ -634,7 +634,6 @@ priv_init(const char *chrootdir, int ctl, uid_t uid, gid_t gid)
 #endif
                }
                close(pair[1]);
-               priv_init_os();
                priv_ping();
                break;
        default: