Module Name:    src
Committed By:   martin
Date:           Mon Apr 11 20:03:45 UTC 2011

Modified Files:
        src/distrib/sets/lists/etc: mi
        src/etc: Makefile
        src/etc/mtree: NetBSD.dist.base special

Log Message:
When run as root, tcpdump will chroot to /var/run/tcpdump - but it can
not look up /etc/protcols in there. So install a copy of /etc/protocols
into the chroot area.
Fixes PR bin/44721.


To generate a diff of this commit:
cvs rdiff -u -r1.221 -r1.222 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.387 -r1.388 src/etc/Makefile
cvs rdiff -u -r1.79 -r1.80 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.135 -r1.136 src/etc/mtree/special

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.221 src/distrib/sets/lists/etc/mi:1.222
--- src/distrib/sets/lists/etc/mi:1.221	Sun Feb 20 19:24:53 2011
+++ src/distrib/sets/lists/etc/mi	Mon Apr 11 20:03:45 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.221 2011/02/20 19:24:53 christos Exp $
+# $NetBSD: mi,v 1.222 2011/04/11 20:03:45 martin Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -332,6 +332,7 @@
 ./root/.profile					etc-root-root
 ./root/.shrc					etc-root-root
 ./var/at/at.deny				etc-cron-root
+./var/chroot/tcpdump/etc/protocols		etc-sys-etc
 ./var/crash/minfree				etc-sys-root
 ./var/cron/tabs/root				etc-cron-root
 ./var/db/locate.database			etc-sys-root

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.387 src/etc/Makefile:1.388
--- src/etc/Makefile:1.387	Wed Feb 16 16:22:13 2011
+++ src/etc/Makefile	Mon Apr 11 20:03:45 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.387 2011/02/16 16:22:13 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.388 2011/04/11 20:03:45 martin Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -301,6 +301,9 @@
 	${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
 	    ${.CURDIR}/etc.${MACHINE}/boot.cfg ${DESTDIR}/
 .endif
+	${_MKMSG_INSTALL} ${DESTDIR}/var/chroot/tcpdump/etc/protocols
+	${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
+	    protocols ${DESTDIR}/var/chroot/tcpdump/etc
 	${_MKMSG_INSTALL} ${DESTDIR}/dev/MAKEDEV
 	${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \
 	    MAKEDEV ${DESTDIR}/dev

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.79 src/etc/mtree/NetBSD.dist.base:1.80
--- src/etc/mtree/NetBSD.dist.base:1.79	Thu Mar 24 17:05:42 2011
+++ src/etc/mtree/NetBSD.dist.base	Mon Apr 11 20:03:45 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.79 2011/03/24 17:05:42 bouyer Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.80 2011/04/11 20:03:45 martin Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -1102,6 +1102,7 @@
 ./var/chroot/pflogd		mode=0755
 ./var/chroot/sshd		mode=0755
 ./var/chroot/tcpdump		mode=0755
+./var/chroot/tcpdump/etc	mode=0755
 ./var/chroot/tftp-proxy		mode=0755
 ./var/crash			mode=0770
 ./var/cron

Index: src/etc/mtree/special
diff -u src/etc/mtree/special:1.135 src/etc/mtree/special:1.136
--- src/etc/mtree/special:1.135	Wed Feb  2 02:20:28 2011
+++ src/etc/mtree/special	Mon Apr 11 20:03:45 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: special,v 1.135 2011/02/02 02:20:28 rmind Exp $
+#	$NetBSD: special,v 1.136 2011/04/11 20:03:45 martin Exp $
 #	@(#)special	8.2 (Berkeley) 1/23/94
 #
 # This file may be overwritten on upgrades.
@@ -395,6 +395,7 @@
 ./var/chroot/pflogd		type=dir  mode=0755
 ./var/chroot/sshd		type=dir  mode=0755
 ./var/chroot/tcpdump		type=dir  mode=0755
+./var/chroot/tcpdump/etc	type=dir  mode=0755
 ./var/chroot/tftp-proxy		type=dir  mode=0755
 ./var/cron			type=dir  mode=0755
 ./var/cron/tabs			type=dir  mode=0700

Reply via email to