Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd Build dhcpcd with privsep support.



details:   https://anonhg.NetBSD.org/src/rev/71c797964fb3
branches:  trunk
changeset: 850342:71c797964fb3
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Apr 02 12:56:01 2020 +0000

description:
Build dhcpcd with privsep support.

diffstat:

 external/bsd/dhcpcd/Makefile.inc         |  7 ++++---
 external/bsd/dhcpcd/include/config.h     |  8 ++++++--
 external/bsd/dhcpcd/sbin/dhcpcd/Makefile |  7 ++++++-
 3 files changed, 16 insertions(+), 6 deletions(-)

diffs (77 lines):

diff -r 42ca9e65bbd7 -r 71c797964fb3 external/bsd/dhcpcd/Makefile.inc
--- a/external/bsd/dhcpcd/Makefile.inc  Thu Apr 02 12:41:47 2020 +0000
+++ b/external/bsd/dhcpcd/Makefile.inc  Thu Apr 02 12:56:01 2020 +0000
@@ -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 @@
                -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'
diff -r 42ca9e65bbd7 -r 71c797964fb3 external/bsd/dhcpcd/include/config.h
--- a/external/bsd/dhcpcd/include/config.h      Thu Apr 02 12:41:47 2020 +0000
+++ b/external/bsd/dhcpcd/include/config.h      Thu Apr 02 12:56:01 2020 +0000
@@ -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
diff -r 42ca9e65bbd7 -r 71c797964fb3 external/bsd/dhcpcd/sbin/dhcpcd/Makefile
--- a/external/bsd/dhcpcd/sbin/dhcpcd/Makefile  Thu Apr 02 12:41:47 2020 +0000
+++ b/external/bsd/dhcpcd/sbin/dhcpcd/Makefile  Thu Apr 02 12:56:01 2020 +0000
@@ -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+=         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 @@
 .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



Home | Main Index | Thread Index | Old Index