aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-29 12:53:36 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-29 12:53:36 +0000
commit3c41c76bfb8e40aca44235fbac0ac3eff801ab81 (patch)
tree58a965863b6c9e8d8b05ab5fb3dd4374fbe8d569
parentedd7f157fee5969cf9de457e0d4f6ef882fb1e30 (diff)
downloadcpt-3c41c76bfb8e40aca44235fbac0ac3eff801ab81.tar.gz
kiss: revert sudo change
FossilOrigin-Name: 8c1ba3362f2d7700d4b9feaa64ac020306a8852bf146a06b7d880d1fd9437bcd
-rwxr-xr-xkiss14
1 files changed, 4 insertions, 10 deletions
diff --git a/kiss b/kiss
index 3c6524c..e6e5116 100755
--- a/kiss
+++ b/kiss
@@ -106,16 +106,10 @@ dosu() {
# below. Great naming of functions all around.
#
# Run a command as root using the cached password. The 'su'
- # and 'sudo' commands allow you to input a password via stdin.
- # To hide the prompt, the command's output is sent to '/dev/tty'
- # and the output of 'su'/'sudo' is sent to '/dev/null'.
- dosudo() {
- if command -v sudo >/dev/null 2>&1; then
- sudo -SEk -- su "${drop_to:-root}" -c "$* >/dev/tty" 2>/dev/null
- else
- su "${drop_to:-root}" -c "$* >/dev/tty" >/dev/null
- fi
- }
+ # command allows you to input a password via stdin. To hide
+ # the prompt, the command's output is sent to '/dev/tty'
+ # and the output of 'su' is sent to '/dev/null'.
+ dosudo() { su "${drop_to:-root}" -c "$* >/dev/tty" >/dev/null; }
# The code below uses the most secure method of sending
# data over stdin based on what is available in the system.