aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/lldpd/patches
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-10-10 13:17:14 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-10-10 13:17:14 +0000
commit47ea3c7feeb6d1a97511c4f4e2f663c36e09d3db (patch)
tree847d30496df1f25414a9e97afc1b1ab9f188d80e /package/network/services/lldpd/patches
parent11549e1b7342c4d64391f3f5f05a1a97828725b0 (diff)
downloadupstream-47ea3c7feeb6d1a97511c4f4e2f663c36e09d3db.tar.gz
upstream-47ea3c7feeb6d1a97511c4f4e2f663c36e09d3db.tar.bz2
upstream-47ea3c7feeb6d1a97511c4f4e2f663c36e09d3db.zip
lldpd: move to trunk and add myself as maintainer
SVN-Revision: 33700
Diffstat (limited to 'package/network/services/lldpd/patches')
-rw-r--r--package/network/services/lldpd/patches/001-no-multiuser.patch40
-rw-r--r--package/network/services/lldpd/patches/002-no-stack-protector.patch10
2 files changed, 50 insertions, 0 deletions
diff --git a/package/network/services/lldpd/patches/001-no-multiuser.patch b/package/network/services/lldpd/patches/001-no-multiuser.patch
new file mode 100644
index 0000000000..5f216c4289
--- /dev/null
+++ b/package/network/services/lldpd/patches/001-no-multiuser.patch
@@ -0,0 +1,40 @@
+--- 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 */
++ /*
+ if ((user = getpwnam(PRIVSEP_USER)) == NULL)
+ fatal("[priv]: no " PRIVSEP_USER " user for privilege separation");
+ uid = user->pw_uid;
+ if ((group = getgrnam(PRIVSEP_GROUP)) == NULL)
+ fatal("[priv]: no " PRIVSEP_GROUP " group for privilege separation");
+ gid = group->gr_gid;
++ */
+
+ /* Spawn off monitor */
+ if ((monitored = fork()) < 0)
+@@ -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]);
diff --git a/package/network/services/lldpd/patches/002-no-stack-protector.patch b/package/network/services/lldpd/patches/002-no-stack-protector.patch
new file mode 100644
index 0000000000..0a0c6fbb69
--- /dev/null
+++ b/package/network/services/lldpd/patches/002-no-stack-protector.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,7 +48,6 @@ AX_CFLAGS_GCC_OPTION([-Wformat])
+ AX_CFLAGS_GCC_OPTION([-Wformat-security])
+ AX_CFLAGS_GCC_OPTION([-Wcast-align])
+ AX_CFLAGS_GCC_OPTION([-Winline])
+-AX_CFLAGS_GCC_OPTION([-fstack-protector])
+ AX_CFLAGS_GCC_OPTION([-D_FORTIFY_SOURCE=2])
+ AX_CFLAGS_GCC_OPTION([-Wdeclaration-after-statement])
+ AX_CFLAGS_GCC_OPTION([-Wno-unused-parameter])