summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2020-07-04 18:30:47 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2020-07-04 18:30:47 +0000
commit70cb33e5b0a824f476f48d429fef96d071cfb121 (patch)
tree76094cc5c495b69f27d3a22c4183ae395ee95303
parent1ca16e1285d2086f7ba37789e97e12f4a0596162 (diff)
Our old ksh(1) bug where eval()uating a || compound list would terminate the
shell has been fixed by benno@; remove workaround. ok naddy@
-rw-r--r--usr.sbin/syspatch/syspatch.sh5
-rw-r--r--usr.sbin/sysupgrade/sysupgrade.sh5
2 files changed, 2 insertions, 8 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index 7e044a885ca..8a609cd7f99 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.162 2020/07/04 14:08:27 ajacoutot Exp $
+# $OpenBSD: syspatch.sh,v 1.163 2020/07/04 18:30:46 ajacoutot Exp $
#
# Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -257,10 +257,7 @@ unpriv()
fi
(($# >= 1))
- # XXX ksh(1) bug; send error code to the caller instead of failing hard
- set +e
eval su -s /bin/sh ${_user} -c "'$@'" || _rc=$?
- set -e
[[ -n ${_file} ]] && chown root "${_file}"
diff --git a/usr.sbin/sysupgrade/sysupgrade.sh b/usr.sbin/sysupgrade/sysupgrade.sh
index afd662a099c..9f20fb9a096 100644
--- a/usr.sbin/sysupgrade/sysupgrade.sh
+++ b/usr.sbin/sysupgrade/sysupgrade.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: sysupgrade.sh,v 1.38 2020/06/17 16:29:02 florian Exp $
+# $OpenBSD: sysupgrade.sh,v 1.39 2020/07/04 18:30:46 ajacoutot Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015 Robert Peichaer <rpe@openbsd.org>
@@ -51,10 +51,7 @@ unpriv()
fi
(($# >= 1))
- # XXX ksh(1) bug; send error code to the caller instead of failing hard
- set +e
eval su -s /bin/sh ${_user} -c "'$@'" || _rc=$?
- set -e
[[ -n ${_file} ]] && chown root "${_file}"