summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-10-26 04:04:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-10-26 04:04:21 +0000
commitf121177d682cf98b467353c6662c1b6a02eb7f74 (patch)
tree6235a7c62a07efe06d473ef1bae174941766cf98
parent2dfdbeb07725cf954fe19e7f10ad9a9e0b72b736 (diff)
use ftp -N option; ok jca
-rw-r--r--usr.sbin/syspatch/syspatch.sh8
-rw-r--r--usr.sbin/sysupgrade/sysupgrade.sh6
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index 6587dbb5344..fe82a0349ac 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.155 2019/10/25 11:14:31 ajacoutot Exp $
+# $OpenBSD: syspatch.sh,v 1.156 2019/10/26 04:04:20 deraadt Exp $
#
# Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -130,7 +130,7 @@ fetch_and_verify()
[[ -n ${_tgz} ]]
[[ -t 0 ]] || echo "${_title} ${_tgz}"
- unpriv -f "${_TMP}/${_tgz}" ftp -VD "${_title}" -o "${_TMP}/${_tgz}" \
+ unpriv -f "${_TMP}/${_tgz}" ftp -N syspatch -VD "${_title}" -o "${_TMP}/${_tgz}" \
"${_MIRROR}/${_tgz}"
(cd ${_TMP} && sha256 -qC ${_TMP}/SHA256 ${_tgz})
@@ -164,7 +164,7 @@ ls_missing()
local _c _d _f _cmd _l="$(ls_installed)" _p _r _sha=${_TMP}/SHA256
# don't output anything on stdout to prevent corrupting the patch list
- unpriv -f "${_sha}.sig" ftp -MVo "${_sha}.sig" "${_MIRROR}/SHA256.sig" \
+ unpriv -f "${_sha}.sig" ftp -N syspatch -MVo "${_sha}.sig" "${_MIRROR}/SHA256.sig" \
>/dev/null
unpriv -f "${_sha}" signify -Veq -x ${_sha}.sig -m ${_sha} -p \
/etc/signify/openbsd-${_OSrev}-syspatch.pub >/dev/null
@@ -175,7 +175,7 @@ ls_missing()
while read _c; do _c=${_c##syspatch${_OSrev}-} &&
[[ -n ${_l} ]] && echo ${_c} | grep -qw -- "${_l}" || echo ${_c}
done | while read _p; do
- _cmd="ftp -MVo - ${_MIRROR}/syspatch${_OSrev}-${_p}.tgz"
+ _cmd="ftp -N syspatch -MVo - ${_MIRROR}/syspatch${_OSrev}-${_p}.tgz"
{ unpriv ${_cmd} | tar tzf -; } 2>/dev/null | while read _f; do
[[ -f /${_f} ]] || continue && echo ${_p} && pkill -u \
_syspatch -xf "${_cmd}" || true && break
diff --git a/usr.sbin/sysupgrade/sysupgrade.sh b/usr.sbin/sysupgrade/sysupgrade.sh
index 96526ac8788..8435971f096 100644
--- a/usr.sbin/sysupgrade/sysupgrade.sh
+++ b/usr.sbin/sysupgrade/sysupgrade.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: sysupgrade.sh,v 1.28 2019/10/20 09:10:43 ajacoutot Exp $
+# $OpenBSD: sysupgrade.sh,v 1.29 2019/10/26 04:04:20 deraadt Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015 Robert Peichaer <rpe@openbsd.org>
@@ -136,7 +136,7 @@ fi
cd ${SETSDIR}
-unpriv -f SHA256.sig ftp -Vmo SHA256.sig ${URL}SHA256.sig
+unpriv -f SHA256.sig ftp -N sysupgrade -Vmo SHA256.sig ${URL}SHA256.sig
_KEY=openbsd-${_KERNV[0]%.*}${_KERNV[0]#*.}-base.pub
_NEXTKEY=openbsd-${NEXT_VERSION%.*}${NEXT_VERSION#*.}-base.pub
@@ -176,7 +176,7 @@ done
[[ -n ${OLD_FILES} ]] && rm ${OLD_FILES}
for f in ${DL}; do
- unpriv -f $f ftp -Vmo ${f} ${URL}${f}
+ unpriv -f $f ftp -N sysupgrade -Vmo ${f} ${URL}${f}
done
if [[ -n ${DL} ]]; then