Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/external/bsd/dhcpcd Sync to head, requested by roy in tic...
details: https://anonhg.NetBSD.org/src/rev/751766a58e79
branches: netbsd-8
changeset: 450826:751766a58e79
user: martin <martin%NetBSD.org@localhost>
date: Fri Apr 26 19:18:21 2019 +0000
description:
Sync to head, requested by roy in ticket #1250:
external/bsd/dhcpcd/dist/compat/consttime_memequal.h up to 1.1.1.1
external/bsd/dhcpcd/dist/.arcconfig delete
external/bsd/dhcpcd/dist/BUILDING.md up to 1.1.1.3
external/bsd/dhcpcd/dist/LICENSE up to 1.1.1.3
external/bsd/dhcpcd/dist/Makefile up to 1.1.1.6
external/bsd/dhcpcd/dist/configure up to 1.1.1.11
external/bsd/dhcpcd/dist/iconfig.mk up to 1.1.1.2
external/bsd/dhcpcd/dist/hooks/20-resolv.conf up to 1.2
external/bsd/dhcpcd/dist/hooks/29-lookup-hostname up to 1.2
external/bsd/dhcpcd/dist/hooks/30-hostname up to 1.2
external/bsd/dhcpcd/dist/hooks/50-ntp.conf up to 1.2
external/bsd/dhcpcd/dist/hooks/50-yp.conf up to 1.2
external/bsd/dhcpcd/dist/hooks/50-ypbind.in up to 1.2
external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in up to 1.3
external/bsd/dhcpcd/dist/src/Makefile up to 1.1.1.5
external/bsd/dhcpcd/dist/src/arp.c up to 1.1.1.10
external/bsd/dhcpcd/dist/src/arp.h up to 1.1.1.7
external/bsd/dhcpcd/dist/src/auth.c up to 1.1.1.7
external/bsd/dhcpcd/dist/src/auth.h up to 1.1.1.4
external/bsd/dhcpcd/dist/src/bpf.c up to 1.8
external/bsd/dhcpcd/dist/src/bpf.h up to 1.1.1.5
external/bsd/dhcpcd/dist/src/common.c up to 1.1.1.7
external/bsd/dhcpcd/dist/src/common.h up to 1.1.1.7
external/bsd/dhcpcd/dist/src/control.c up to 1.1.1.5
external/bsd/dhcpcd/dist/src/control.h up to 1.1.1.3
external/bsd/dhcpcd/dist/src/defs.h up to 1.1.1.20
external/bsd/dhcpcd/dist/src/dev.c up to 1.1.1.4
external/bsd/dhcpcd/dist/src/dev.h up to 1.1.1.3
external/bsd/dhcpcd/dist/src/dhcp-common.c up to 1.1.1.5
external/bsd/dhcpcd/dist/src/dhcp-common.h up to 1.1.1.3
external/bsd/dhcpcd/dist/src/dhcp.c up to 1.18
external/bsd/dhcpcd/dist/src/dhcp.h up to 1.1.1.9
external/bsd/dhcpcd/dist/src/dhcp6.c up to 1.6
external/bsd/dhcpcd/dist/src/dhcp6.h up to 1.1.1.9
external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in up to 1.1.1.3
external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in up to 1.1.1.3
external/bsd/dhcpcd/dist/src/dhcpcd.8.in up to 1.1.1.12
external/bsd/dhcpcd/dist/src/dhcpcd.c up to 1.18
external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in up to 1.1.1.12
external/bsd/dhcpcd/dist/src/dhcpcd.h up to 1.1.1.9
external/bsd/dhcpcd/dist/src/duid.c up to 1.1.1.5
external/bsd/dhcpcd/dist/src/eloop.c up to 1.1.1.6
external/bsd/dhcpcd/dist/src/eloop.h up to 1.1.1.4
external/bsd/dhcpcd/dist/src/if-bsd.c up to 1.6
external/bsd/dhcpcd/dist/src/if-linux-wext.c up to 1.1.1.3
external/bsd/dhcpcd/dist/src/if-linux.c up to 1.1.1.12
external/bsd/dhcpcd/dist/src/if-options.c up to 1.13
external/bsd/dhcpcd/dist/src/if-options.h up to 1.1.1.8
external/bsd/dhcpcd/dist/src/if-sun.c up to 1.1.1.7
external/bsd/dhcpcd/dist/src/if.c up to 1.1.1.12
external/bsd/dhcpcd/dist/src/if.h up to 1.1.1.7
external/bsd/dhcpcd/dist/src/ipv4.c up to 1.1.1.13
external/bsd/dhcpcd/dist/src/ipv4.h up to 1.1.1.7
external/bsd/dhcpcd/dist/src/ipv4ll.c up to 1.1.1.7
external/bsd/dhcpcd/dist/src/ipv4ll.h up to 1.1.1.6
external/bsd/dhcpcd/dist/src/ipv6.c up to 1.1.1.16
external/bsd/dhcpcd/dist/src/ipv6.h up to 1.1.1.10
external/bsd/dhcpcd/dist/src/ipv6nd.c up to 1.6
external/bsd/dhcpcd/dist/src/ipv6nd.h up to 1.1.1.9
external/bsd/dhcpcd/dist/src/logerr.c up to 1.1.1.3
external/bsd/dhcpcd/dist/src/logerr.h up to 1.1.1.4
external/bsd/dhcpcd/dist/src/route.c up to 1.1.1.10
external/bsd/dhcpcd/dist/src/route.h up to 1.1.1.6
external/bsd/dhcpcd/dist/src/sa.c up to 1.1.1.4
external/bsd/dhcpcd/dist/src/sa.h up to 1.1.1.3
external/bsd/dhcpcd/dist/src/script.c up to 1.1.1.7
external/bsd/dhcpcd/dist/src/script.h up to 1.1.1.3
external/bsd/dhcpcd/dist/src/dev/udev.c up to 1.1.1.3
external/bsd/dhcpcd/dist/tests/Makefile up to 1.1.1.2
external/bsd/dhcpcd/sbin/dhcpcd/Makefile up to 1.45
Import dhcpcd-7.2.1 with the following changes:
* auth: Use consttime_memequal to avoid latency attack
* DHCP: Fix a potential 1 byte read overflow with DHO_OPTSOVERLOADED
* DHCPv6: Fix a potential buffer overflow reading NA/TA addresses
diffstat:
external/bsd/dhcpcd/dist/.arcconfig | 3 -
external/bsd/dhcpcd/dist/BUILDING.md | 3 -
external/bsd/dhcpcd/dist/LICENSE | 2 +-
external/bsd/dhcpcd/dist/Makefile | 12 +-
external/bsd/dhcpcd/dist/compat/consttime_memequal.h | 28 +
external/bsd/dhcpcd/dist/configure | 31 +-
external/bsd/dhcpcd/dist/hooks/20-resolv.conf | 12 +-
external/bsd/dhcpcd/dist/hooks/29-lookup-hostname | 2 +-
external/bsd/dhcpcd/dist/hooks/30-hostname | 8 +-
external/bsd/dhcpcd/dist/hooks/50-ntp.conf | 2 +-
external/bsd/dhcpcd/dist/hooks/50-yp.conf | 2 +-
external/bsd/dhcpcd/dist/hooks/50-ypbind.in | 2 +-
external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in | 19 +-
external/bsd/dhcpcd/dist/iconfig.mk | 3 +-
external/bsd/dhcpcd/dist/src/Makefile | 6 +-
external/bsd/dhcpcd/dist/src/arp.c | 21 +-
external/bsd/dhcpcd/dist/src/arp.h | 7 +-
external/bsd/dhcpcd/dist/src/auth.c | 10 +-
external/bsd/dhcpcd/dist/src/auth.h | 2 +-
external/bsd/dhcpcd/dist/src/bpf.c | 2 +-
external/bsd/dhcpcd/dist/src/bpf.h | 2 +-
external/bsd/dhcpcd/dist/src/common.c | 50 +-
external/bsd/dhcpcd/dist/src/common.h | 12 +-
external/bsd/dhcpcd/dist/src/control.c | 4 +-
external/bsd/dhcpcd/dist/src/control.h | 2 +-
external/bsd/dhcpcd/dist/src/defs.h | 4 +-
external/bsd/dhcpcd/dist/src/dev.c | 2 +-
external/bsd/dhcpcd/dist/src/dev.h | 2 +-
external/bsd/dhcpcd/dist/src/dev/udev.c | 2 +-
external/bsd/dhcpcd/dist/src/dhcp-common.c | 2 +-
external/bsd/dhcpcd/dist/src/dhcp-common.h | 2 +-
external/bsd/dhcpcd/dist/src/dhcp.c | 312 ++++--
external/bsd/dhcpcd/dist/src/dhcp.h | 18 +-
external/bsd/dhcpcd/dist/src/dhcp6.c | 295 +++---
external/bsd/dhcpcd/dist/src/dhcp6.h | 26 +-
external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in | 2 +-
external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in | 2 +-
external/bsd/dhcpcd/dist/src/dhcpcd.8.in | 32 +-
external/bsd/dhcpcd/dist/src/dhcpcd.c | 169 +++-
external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in | 122 +-
external/bsd/dhcpcd/dist/src/dhcpcd.h | 38 +-
external/bsd/dhcpcd/dist/src/duid.c | 5 +-
external/bsd/dhcpcd/dist/src/eloop.c | 2 +-
external/bsd/dhcpcd/dist/src/eloop.h | 2 +-
external/bsd/dhcpcd/dist/src/if-bsd.c | 331 ++++---
external/bsd/dhcpcd/dist/src/if-linux-wext.c | 2 +-
external/bsd/dhcpcd/dist/src/if-linux.c | 104 +-
external/bsd/dhcpcd/dist/src/if-options.c | 155 +-
external/bsd/dhcpcd/dist/src/if-options.h | 4 +-
external/bsd/dhcpcd/dist/src/if-sun.c | 777 ++++++++++++------
external/bsd/dhcpcd/dist/src/if.c | 163 +++-
external/bsd/dhcpcd/dist/src/if.h | 12 +-
external/bsd/dhcpcd/dist/src/ipv4.c | 28 +-
external/bsd/dhcpcd/dist/src/ipv4.h | 14 +-
external/bsd/dhcpcd/dist/src/ipv4ll.c | 137 ++-
external/bsd/dhcpcd/dist/src/ipv4ll.h | 16 +-
external/bsd/dhcpcd/dist/src/ipv6.c | 135 +-
external/bsd/dhcpcd/dist/src/ipv6.h | 35 +-
external/bsd/dhcpcd/dist/src/ipv6nd.c | 512 ++++++++---
external/bsd/dhcpcd/dist/src/ipv6nd.h | 22 +-
external/bsd/dhcpcd/dist/src/logerr.c | 2 +-
external/bsd/dhcpcd/dist/src/logerr.h | 2 +-
external/bsd/dhcpcd/dist/src/route.c | 11 +-
external/bsd/dhcpcd/dist/src/route.h | 4 +-
external/bsd/dhcpcd/dist/src/sa.c | 2 +-
external/bsd/dhcpcd/dist/src/sa.h | 2 +-
external/bsd/dhcpcd/dist/src/script.c | 31 +-
external/bsd/dhcpcd/dist/src/script.h | 2 +-
external/bsd/dhcpcd/dist/tests/Makefile | 6 +-
external/bsd/dhcpcd/sbin/dhcpcd/Makefile | 7 +-
70 files changed, 2322 insertions(+), 1480 deletions(-)
diffs (truncated from 8169 to 300 lines):
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/.arcconfig
--- a/external/bsd/dhcpcd/dist/.arcconfig Fri Apr 26 19:08:03 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-{
- "phabricator.uri" : "https://dev.marples.name/"
-}
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/BUILDING.md
--- a/external/bsd/dhcpcd/dist/BUILDING.md Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/BUILDING.md Fri Apr 26 19:18:21 2019 +0000
@@ -3,9 +3,6 @@
This attempts to document various ways of building dhcpcd for your
platform.
-Building for distribution (ie making a dhcpcd source tarball) now requires
-gmake-4 or any BSD make.
-
## Size is an issue
To compile small dhcpcd, maybe to be used for installation media where
size is a concern, you can use the `--small` configure option to enable
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/LICENSE
--- a/external/bsd/dhcpcd/dist/LICENSE Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/LICENSE Fri Apr 26 19:18:21 2019 +0000
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
+Copyright (c) 2006-2019 Roy Marples <roy%marples.name@localhost>
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/Makefile
--- a/external/bsd/dhcpcd/dist/Makefile Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/Makefile Fri Apr 26 19:18:21 2019 +0000
@@ -22,10 +22,10 @@
.SUFFIXES: .in
all: config.h
- for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
+ for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
depend: config.h
- for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
+ for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
tests:
cd $@; ${MAKE} $@
@@ -36,17 +36,17 @@
cd $@; ${MAKE}
eginstall:
- for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
+ for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
install:
- for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
+ for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
proginstall:
- for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
+ for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
clean:
rm -rf cov-int dhcpcd.xz
- for x in ${SUBDIRS} tests; do cd $$x; ${MAKE} $@; cd ..; done
+ for x in ${SUBDIRS} tests; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
distclean: clean
rm -f config.h config.mk config.log \
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/compat/consttime_memequal.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/dhcpcd/dist/compat/consttime_memequal.h Fri Apr 26 19:18:21 2019 +0000
@@ -0,0 +1,28 @@
+/*
+ * Written by Matthias Drochner <drochner%NetBSD.org@localhost>.
+ * Public domain.
+ */
+
+#ifndef CONSTTIME_MEMEQUAL_H
+#define CONSTTIME_MEMEQUAL_H
+inline static int
+consttime_memequal(const void *b1, const void *b2, size_t len)
+{
+ const unsigned char *c1 = b1, *c2 = b2;
+ unsigned int res = 0;
+
+ while (len--)
+ res |= *c1++ ^ *c2++;
+
+ /*
+ * Map 0 to 1 and [1, 256) to 0 using only constant-time
+ * arithmetic.
+ *
+ * This is not simply `!res' because although many CPUs support
+ * branchless conditional moves and many compilers will take
+ * advantage of them, certain compilers generate branches on
+ * certain CPUs for `!res'.
+ */
+ return (1 & ((res - 1) >> 8));
+}
+#endif /* CONSTTIME_MEMEQUAL_H */
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/configure
--- a/external/bsd/dhcpcd/dist/configure Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/configure Fri Apr 26 19:18:21 2019 +0000
@@ -13,6 +13,7 @@
INET6=
ARC4RANDOM=
CLOSEFROM=
+CONSTTIME_MEMEQUAL=
STRLCPY=
UDEV=
OS=
@@ -91,6 +92,7 @@
--without-sha256) SHA2=no;;
--without-hmac) HMAC=no;;
--without-dev) DEV=no;;
+ --with-udev) DEV=yes; UDEV=yes;;
--without-udev) UDEV=no;;
--with-poll) POLL="$var";;
--serviceexists) SERVICEEXISTS=$var;;
@@ -98,7 +100,7 @@
--servicestatus) SERVICESTATUS=$var;;
--small) SMALL=yes;;
--statusarg) STATUSARG=$var;;
- --infodir|--includedir) ;; # ignore autotools
+ --infodir) ;; # ignore autotools
--disable-maintainer-mode|--disable-dependency-tracking) ;;
--disable-silent-rules) ;;
-V|--version)
@@ -453,7 +455,7 @@
echo "CPPFLAGS+= -D_XPG4_2 -D__EXTENSIONS__ -DBSD_COMP" \
>>$CONFIG_MK
echo "DHCPCD_SRCS+= if-sun.c" >>$CONFIG_MK
- echo "LDADD+= -ldlpi" >>$CONFIG_MK
+ echo "LDADD+= -ldlpi -lkstat" >>$CONFIG_MK
;;
*)
echo "DHCPCD_SRCS+= if-bsd.c" >>$CONFIG_MK
@@ -845,6 +847,27 @@
echo "#include \"compat/strtoi.h\"" >>$CONFIG_H
fi
+if [ -z "$CONSTTIME_MEMEQUAL" ]; then
+ printf "Testing for consttime_memequal ... "
+ cat <<EOF >_consttime_memequal.c
+#include <string.h>
+int main(void) {
+ return consttime_memequal("deadbeef", "deadbeef", 8);
+}
+EOF
+ if $XCC _consttime_memequal.c -o _consttime_memequal 2>&3; then
+ CONSTTIME_MEMEQUAL=yes
+ else
+ CONSTTIME_MEMEQUAL=no
+ fi
+ echo "$CONSTTIME_MEMEQUAL"
+ rm -f _consttime_memequal.c _consttime_memequal
+fi
+if [ "$CONSTTIME_MEMEQUAL" = no ]; then
+ echo "#include \"compat/consttime_memequal.h\"" \
+ >>$CONFIG_H
+fi
+
if [ -z "$DPRINTF" ]; then
printf "Testing for dprintf ... "
cat <<EOF >_dprintf.c
@@ -1344,6 +1367,10 @@
rm -f _udev.c _udev
elif [ "$DEV" != no -a "$UDEV" != no ]; then
echo "no"
+ if [ -n "$UDEV" ]; then
+ echo "udev has been explicity requested ... aborting" >&2
+ exit 1
+ fi
fi
if [ "$DEV" = yes ]; then
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/hooks/20-resolv.conf
--- a/external/bsd/dhcpcd/dist/hooks/20-resolv.conf Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/20-resolv.conf Fri Apr 26 19:18:21 2019 +0000
@@ -77,19 +77,19 @@
eval_nd_dns()
{
eval ltime=\$nd${i}_rdnss${j}_lifetime
- if [ -z "$ltime" -o "$ltime" = 0 ]; then
+ if [ -z "$ltime" ] || [ "$ltime" = 0 ]; then
rdnss=
else
eval rdnss=\$nd${i}_rdnss${j}_servers
fi
eval ltime=\$nd${i}_dnssl${j}_lifetime
- if [ -z "$ltime" -o "$ltime" = 0 ]; then
+ if [ -z "$ltime" ] || [ "$ltime" = 0 ]; then
dnssl=
else
eval dnssl=\$nd${i}_dnssl${j}_search
fi
- [ -z "$rdnss" -a -z "$dnssl" ] && return 1
+ [ -z "${rdnss}${dnssl}" ] && return 1
[ -n "$rdnss" ] && new_rdnss="$new_rdnss${new_rdnss:+ }$rdnss"
[ -n "$dnssl" ] && new_dnssl="$new_dnssl${new_dnssl:+ }$dnssl"
@@ -130,9 +130,9 @@
fi
# If we don't have any configuration, remove it
- if [ -z "$new_domain_name_servers" -a \
- -z "$new_domain_name" -a \
- -z "$new_domain_search" ]; then
+ if [ -z "$new_domain_name_servers" ] &&
+ [ -z "$new_domain_name" ] &&
+ [ -z "$new_domain_search" ]; then
remove_resolv_conf
return $?
fi
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/hooks/29-lookup-hostname
--- a/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname Fri Apr 26 19:18:21 2019 +0000
@@ -29,7 +29,7 @@
set_hostname()
{
- if [ -z "$new_host_name" -a -z "$new_fqdn_name" ]; then
+ if [ -z "${new_host_name}${new_fqdn_name}" ]; then
export new_host_name="$(lookup_hostname)"
fi
}
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/hooks/30-hostname
--- a/external/bsd/dhcpcd/dist/hooks/30-hostname Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/30-hostname Fri Apr 26 19:18:21 2019 +0000
@@ -87,8 +87,8 @@
fi
elif [ -n "$old_host_name" ]; then
if ${hfqdn}; then
- if [ -n "$old_domain_name" -a \
- "$old_host_name" = "${old_host_name#*.}" ]
+ if [ -n "$old_domain_name" ] &&
+ [ "$old_host_name" = "${old_host_name#*.}" ]
then
[ "$hostname" = \
"$old_host_name.$old_domain_name" ]
@@ -131,8 +131,8 @@
fi
elif [ -n "$new_host_name" ]; then
if ${hfqdn}; then
- if [ -n "$new_domain_name" -a \
- "$new_host_name" = "${new_host_name#*.}" ]
+ if [ -n "$new_domain_name" ] &&
+ [ "$new_host_name" = "${new_host_name#*.}" ]
then
try_hostname "$new_host_name.$new_domain_name"
else
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/hooks/50-ntp.conf
--- a/external/bsd/dhcpcd/dist/hooks/50-ntp.conf Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/50-ntp.conf Fri Apr 26 19:18:21 2019 +0000
@@ -96,7 +96,7 @@
printf %s "$servers" >> "$cf"
echo "$signature_base_end${header:+ $from }$header" >> "$cf"
else
- [ -e "$ntp_conf" -a -e "$cf" ] || return
+ [ -e "$ntp_conf" ] && [ -e "$cf" ] || return
fi
# If we changed anything, restart ntpd
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/hooks/50-yp.conf
--- a/external/bsd/dhcpcd/dist/hooks/50-yp.conf Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/50-yp.conf Fri Apr 26 19:18:21 2019 +0000
@@ -8,7 +8,7 @@
make_yp_conf()
{
- [ -z "$new_nis_domain" -a -z "$new_nis_servers" ] && return 0
+ [ -z "${new_nis_domain}${new_nis_servers}" ] && return 0
cf=/etc/yp.conf."$ifname"
rm -f "$cf"
echo "$signature" > "$cf"
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/hooks/50-ypbind.in
--- a/external/bsd/dhcpcd/dist/hooks/50-ypbind.in Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/50-ypbind.in Fri Apr 26 19:18:21 2019 +0000
@@ -41,7 +41,7 @@
fi
nd="$(best_domain)"
- if [ $? = 0 -a "$nd" != "$(domainname)" ]; then
+ if [ $? = 0 ] && [ "$nd" != "$(domainname)" ]; then
domainname "$nd"
if [ -n "$ypbind_restart_cmd" ]; then
eval $ypbind_restart_cmd
diff -r f4e51cd82e7e -r 751766a58e79 external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in
--- a/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in Fri Apr 26 19:08:03 2019 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in Fri Apr 26 19:18:21 2019 +0000
@@ -107,7 +107,7 @@
# Compare two files.
comp_file()
{
- [ -e "$1" -a -e "$2" ] || return 1
+ [ -e "$1" ] && [ -e "$2" ] || return 1
if type cmp >/dev/null 2>&1; then
cmp -s "$1" "$2"
@@ -187,11 +187,11 @@
Home |
Main Index |
Thread Index |
Old Index