su: fix issues with new as_user stuff

This commit is contained in:
Dylan Araps 2021-07-19 21:05:01 +03:00
parent 5f82eb3ca0
commit 9dd0a1fc25
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

2
kiss
View File

@ -131,7 +131,7 @@ as_user() {
printf 'Using '%s' (to become %s)\n' "$cmd_su" "$user"
case ${cmd_su##*/} in
su) "$cmd_su" -c "$* <&3" "$user" 3<&0 </dev/tty ;;
su) "$cmd_su" -c "$* <&3" - "$user" 3<&0 </dev/tty ;;
*) "$cmd_su" -u "$user" -- "$@"
esac
}