Module Name: src
Committed By: roy
Date: Thu Apr 2 12:56:01 UTC 2020
Modified Files:
src/external/bsd/dhcpcd: Makefile.inc
src/external/bsd/dhcpcd/include: config.h
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile
Log Message:
Build dhcpcd with privsep support.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/Makefile.inc
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/include/config.h
cvs rdiff -u -r1.50 -r1.51 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/dhcpcd/Makefile.inc
diff -u src/external/bsd/dhcpcd/Makefile.inc:1.3 src/external/bsd/dhcpcd/Makefile.inc:1.4
--- src/external/bsd/dhcpcd/Makefile.inc:1.3 Thu Jul 5 05:41:17 2018
+++ src/external/bsd/dhcpcd/Makefile.inc Thu Apr 2 12:56:01 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.3 2018/07/05 05:41:17 triaxx Exp $
+# $NetBSD: Makefile.inc,v 1.4 2020/04/02 12:56:01 roy Exp $
SRCDIR= ${NETBSDSRCDIR}/external/bsd/dhcpcd
DIST= ${SRCDIR}/dist
@@ -7,10 +7,11 @@ SED_SYS= -e 's:@SYSCONFDIR@:/etc:g' \
-e 's:@DATADIR@:/usr/share/examples:g' \
-e 's:@DBDIR@:/var/db/dhcpcd:g' \
-e 's:@LIBDIR@:/lib:g' \
- -e 's:@RUNDIR@:/var/run:g' \
+ -e 's:@RUNDIR@:/var/run/dhcpcd:g' \
-e 's:@HOOKDIR@:/libexec/dhcpcd-hooks:g' \
-e 's:@SCRIPT@:/libexec/dhcpcd-run-hooks:g' \
-e 's:@SERVICEEXISTS@::g' \
-e 's:@SERVICECMD@::g' \
-e 's:@SERVICESTATUS@::g' \
- -e 's:@STATUSARG@::g'
+ -e 's:@STATUSARG@::g' \
+ -e 's:@DEFAULT_HOSTNAME@::g'
Index: src/external/bsd/dhcpcd/include/config.h
diff -u src/external/bsd/dhcpcd/include/config.h:1.4 src/external/bsd/dhcpcd/include/config.h:1.5
--- src/external/bsd/dhcpcd/include/config.h:1.4 Wed Jul 24 09:59:28 2019
+++ src/external/bsd/dhcpcd/include/config.h Thu Apr 2 12:56:01 2020
@@ -1,16 +1,20 @@
/* netbsd */
+#ifndef SYSCONFDIR
#define SYSCONFDIR "/etc"
#define SBINDIR "/sbin"
#define LIBDIR "/lib"
#define LIBEXECDIR "/libexec"
#define DBDIR "/var/db/dhcpcd"
-#define RUNDIR "/var/run"
+#define RUNDIR "/var/run/dhcpcd"
+#endif
+#ifndef PRIVSEP_USER
+#define PRIVSEP_USER "_dhcpcd"
+#endif
#define HAVE_IFAM_PID
#define HAVE_IFAM_ADDRFLAGS
#define HAVE_IFADDRS_ADDRFLAGS
#define HAVE_OPEN_MEMSTREAM
#define HAVE_UTIL_H
-#define HAVE_SETPROCTITLE
#define HAVE_SYS_QUEUE_H
#define HAVE_SYS_RBTREE_H
#define HAVE_REALLOCARRAY
Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.50 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.51
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.50 Wed Jan 29 23:42:57 2020
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Thu Apr 2 12:56:01 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.50 2020/01/29 23:42:57 christos Exp $
+# $NetBSD: Makefile,v 1.51 2020/04/02 12:56:01 roy Exp $
#
WARNS?= 6
@@ -13,6 +13,10 @@ SRCS+= if.c if-options.c route.c sa.c s
SRCS+= dhcp-common.c dhcpcd-embedded.c
SRCS+= if-bsd.c
+CPPFLAGS+= -DPRIVSEP -DPRIVSEP_USER=\"_dhcpcd\"
+SRCS+= privsep.c privsep-root.c privsep-inet.c
+SRCS+= privsep-bsd.c
+
CPPFLAGS+= -DHAVE_CONFIG_H -D_OPENBSD_SOURCE
USE_INET?= yes
@@ -27,6 +31,7 @@ SRCS+= auth.c
.if (${USE_INET} != "no")
CPPFLAGS+= -DINET
SRCS+= bpf.c dhcp.c ipv4.c
+SRCS+= privsep-bpf.c
.if !defined(SMALLPROG)
CPPFLAGS+= -DARP
SRCS+= arp.c