vapier 15/04/25 01:47:55
Added: iputils-20121221-parallel-doc.patch
iputils-20121221-tftpd-syslog.patch
iputils-20121221-tftpd-setid.patch
Log:
Add fix from upstream for checking tftpd set*id calls. Add USE flags to
control all the utils (other than ping) as they are all fairly uncommon. Drop
ipg entirely as it is a pretty useless script. Re-add support for traceroute
via the new USE flag.
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key
D2E96200)
Revision Changes Path
1.1 net-misc/iputils/files/iputils-20121221-parallel-doc.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/iputils/files/iputils-20121221-parallel-doc.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/iputils/files/iputils-20121221-parallel-doc.patch?rev=1.1&content-type=text/plain
Index: iputils-20121221-parallel-doc.patch
===================================================================
>From 4e322b85a12ba3ef5e8118724e3442b2ebb0f6d6 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <[email protected]>
Date: Wed, 1 Aug 2012 11:43:34 -0400
Subject: [PATCH iputils] doc: fix parallel build of html/man pages
The use of the same tempdir prevents building of these files in parallel.
So build all of them in unique tempdirs so we can do them in parallel.
Signed-off-by: Mike Frysinger <[email protected]>
---
doc/Makefile | 37 ++++++++++++++++++++++++-------------
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/doc/Makefile b/doc/Makefile
index 7ec4f1c..4f930a3 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -12,29 +12,40 @@ man: $(MANFILES)
# lots of some strange temporary junk directories and files.
# So, scope it to a temporary dir and clean all after each run.
-$(HTMLFILES): index.db
- @-rm -rf tmp.db2html
- @mkdir tmp.db2html
- @set -e; cd tmp.db2html; docbook2html ../$< ; mv *.html ..
- @-rm -rf tmp.db2html
+SETUP_TMPDIR = \
+ t="tmp.db2html.$@"; \
+ rm -rf $$t; \
+ mkdir $$t; \
+ cd $$t
+CLEAN_TMPDIR = \
+ cd ..; \
+ rm -rf $$t
+
+MAKE_HTML = \
+ @set -e; \
+ $(SETUP_TMPDIR); \
+ docbook2html ../$<; \
+ mv *.html ..; \
+ $(CLEAN_TMPDIR)
+$(HTMLFILES): index.db
+ $(MAKE_HTML)
iputils.html: iputils.db
- @-rm -rf tmp.db2html
- @mkdir tmp.db2html
- @set -e; cd tmp.db2html; docbook2html -u -o html ../$< ; mv html/$@ ..
- @-rm -rf tmp.db2html
+ $(MAKE_HTML)
# docbook2man produces utterly ugly output and I did not find
# any way to customize this but hacking backend perl script a little.
# Well, hence...
$(MANFILES): index.db
- @-mkdir tmp.db2man
- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ;
mv $@ ..
- @-rm -rf tmp.db2man
+ @set -e; \
+ $(SETUP_TMPDIR); \
+ nsgmls ../$< | sgmlspl ../docbook2man-spec.pl; \
+ mv $@ ..; \
+ $(CLEAN_TMPDIR)
clean:
- @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
+ @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html* tmp.db2man*
snapshot:
@date "+%y%m%d" > snapshot.db
--
2.3.5
1.1 net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch?rev=1.1&content-type=text/plain
Index: iputils-20121221-tftpd-syslog.patch
===================================================================
>From e88ed3752872d7c7ca37d95eb4d434ca4d3c4eae Mon Sep 17 00:00:00 2001
From: Mike Frysinger <[email protected]>
Date: Sat, 19 Apr 2014 10:39:39 -0400
Subject: [PATCH iputils] tftpd: fix syslog setup
Commit d81a44625b04d487c895473aa77af13420b7afdd added support for checking
the set*id calls, but would call syslog() before it had called openlog().
Move the call up earlier to fix that.
Signed-off-by: Mike Frysinger <[email protected]>
---
tftpd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tftpd.c b/tftpd.c
index e3af2f4..7ddc8eb 100644
--- a/tftpd.c
+++ b/tftpd.c
@@ -109,6 +109,8 @@ int main(int ac, char **av)
register int n = 0;
int on = 1;
+ openlog("tftpd", LOG_PID, LOG_DAEMON);
+
/* Sanity. If parent forgot to setuid() on us. */
if (geteuid() == 0) {
if (setgid(65534)) {
@@ -125,7 +127,6 @@ int main(int ac, char **av)
while (ac-- > 0 && n < MAXARG)
dirs[n++] = *av++;
- openlog("tftpd", LOG_PID, LOG_DAEMON);
if (ioctl(0, FIONBIO, &on) < 0) {
syslog(LOG_ERR, "ioctl(FIONBIO): %m\n");
exit(1);
--
2.3.5
1.1 net-misc/iputils/files/iputils-20121221-tftpd-setid.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/iputils/files/iputils-20121221-tftpd-setid.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/iputils/files/iputils-20121221-tftpd-setid.patch?rev=1.1&content-type=text/plain
Index: iputils-20121221-tftpd-setid.patch
===================================================================
>From d81a44625b04d487c895473aa77af13420b7afdd Mon Sep 17 00:00:00 2001
From: YOSHIFUJI Hideaki <[email protected]>
Date: Thu, 19 Jun 2014 17:25:49 +0900
Subject: [PATCH iputils] tftpd: Exit if setuid()/setgid() failed.
Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
---
tftpd.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tftpd.c b/tftpd.c
index 2a39ec4..e3af2f4 100644
--- a/tftpd.c
+++ b/tftpd.c
@@ -111,8 +111,14 @@ int main(int ac, char **av)
/* Sanity. If parent forgot to setuid() on us. */
if (geteuid() == 0) {
- setgid(65534);
- setuid(65534);
+ if (setgid(65534)) {
+ syslog(LOG_ERR, "setgid");
+ exit(1);
+ }
+ if (setuid(65534)) {
+ syslog(LOG_ERR, "setuid");
+ exit(1);
+ }
}
ac--; av++;
--
2.3.5