[packages] lldpd: update to 0.6.0, remove default/obsolete CONFIGURE_{ARGS,VARS}, use PKG_INSTALL
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32494 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
diff -urb lldpd-0.3.orig/src/priv.c lldpd-0.3/src/priv.c
|
||||
--- lldpd-0.3.orig/src/priv.c 2008-12-30 07:35:28.000000000 +0100
|
||||
+++ lldpd-0.3/src/priv.c 2008-12-30 07:40:55.000000000 +0100
|
||||
@@ -522,12 +522,14 @@
|
||||
--- a/src/priv.c
|
||||
+++ b/src/priv.c
|
||||
@@ -518,12 +518,14 @@ priv_init(char *chrootdir)
|
||||
fatal("[priv]: unable to create socket pair for privilege separation");
|
||||
|
||||
/* Get users */
|
||||
@ -16,26 +15,26 @@ diff -urb lldpd-0.3.orig/src/priv.c lldpd-0.3/src/priv.c
|
||||
|
||||
/* Spawn off monitor */
|
||||
if ((monitored = fork()) < 0)
|
||||
@@ -535,17 +537,17 @@
|
||||
switch (monitored) {
|
||||
case 0:
|
||||
/* We are in the children, drop privileges */
|
||||
- if (chroot(chrootdir) == -1)
|
||||
- fatal("[priv]: unable to chroot");
|
||||
- if (chdir("/") != 0)
|
||||
+ /*if (chroot(chrootdir) == -1)
|
||||
+ fatal("[priv]: unable to chroot");*/
|
||||
+ if (chdir("/tmp") != 0)
|
||||
fatal("[priv]: unable to chdir");
|
||||
gidset[0] = gid;
|
||||
- if (setresgid(gid, gid, gid) == -1)
|
||||
+ /*if (setresgid(gid, gid, gid) == -1)
|
||||
fatal("[priv]: setresgid() failed");
|
||||
if (setgroups(1, gidset) == -1)
|
||||
fatal("[priv]: setgroups() failed");
|
||||
if (setresuid(uid, uid, uid) == -1)
|
||||
- fatal("[priv]: setresuid() failed");
|
||||
+ fatal("[priv]: setresuid() failed");*/
|
||||
@@ -534,17 +536,17 @@ priv_init(char *chrootdir)
|
||||
if (RUNNING_ON_VALGRIND)
|
||||
LLOG_WARNX("[priv]: running on valgrind, keep privileges");
|
||||
else {
|
||||
- if (chroot(chrootdir) == -1)
|
||||
- fatal("[priv]: unable to chroot");
|
||||
- if (chdir("/") != 0)
|
||||
+ /*if (chroot(chrootdir) == -1)
|
||||
+ fatal("[priv]: unable to chroot");*/
|
||||
+ if (chdir("/tmp") != 0)
|
||||
fatal("[priv]: unable to chdir");
|
||||
gidset[0] = gid;
|
||||
- if (setresgid(gid, gid, gid) == -1)
|
||||
+ /*if (setresgid(gid, gid, gid) == -1)
|
||||
fatal("[priv]: setresgid() failed");
|
||||
if (setgroups(1, gidset) == -1)
|
||||
fatal("[priv]: setgroups() failed");
|
||||
if (setresuid(uid, uid, uid) == -1)
|
||||
- fatal("[priv]: setresuid() failed");
|
||||
+ fatal("[priv]: setresuid() failed");*/
|
||||
}
|
||||
remote = pair[0];
|
||||
close(pair[1]);
|
||||
priv_ping();
|
||||
|
Reference in New Issue
Block a user