aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-30 08:17:44 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-30 08:17:44 +0000
commit9ddd4101dd985e3460ea02edeaa3c414a53589b1 (patch)
tree5b29e5e0a01290c00e0ac7d4cdd85ecb640be777
parent61647abe7e0b7a26eb4db06ea13f78ee9bc71f5c (diff)
downloadcpt-9ddd4101dd985e3460ea02edeaa3c414a53589b1.tar.gz
kiss: Fix stdin with su
FossilOrigin-Name: f7b492cd8ca457696adbb1ff749f0c3da51dc425166763a125d74523ee0ef2df
-rwxr-xr-xkiss3
1 files changed, 2 insertions, 1 deletions
diff --git a/kiss b/kiss
index 69e2d05..a95fd0b 100755
--- a/kiss
+++ b/kiss
@@ -55,7 +55,8 @@ as_root() {
elif command -v doas >/dev/null; then
KISS_FORCE="$KISS_FORCE" doas "$@"
else
- su -pc "KISS_FORCE=$KISS_FORCE $*"
+ exec 3<&0
+ su -pc "KISS_FORCE=$KISS_FORCE $* <&3" </dev/tty
fi
exit