mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-09-28 12:22:39 -06:00
kiss: better fix for su
This commit is contained in:
parent
3f889ac262
commit
3820e00e32
3
kiss
3
kiss
@ -131,7 +131,7 @@ as_user() {
|
|||||||
printf 'Using '%s' (to become %s)\n' "$cmd_su" "$user"
|
printf 'Using '%s' (to become %s)\n' "$cmd_su" "$user"
|
||||||
|
|
||||||
case ${cmd_su##*/} in
|
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" -- "$@"
|
*) "$cmd_su" -u "$user" -- "$@"
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -1696,6 +1696,7 @@ args() {
|
|||||||
case $action in a|alternatives|i|install|r|remove)
|
case $action in a|alternatives|i|install|r|remove)
|
||||||
if ok "$1" && ! am_owner "$KISS_ROOT/"; then
|
if ok "$1" && ! am_owner "$KISS_ROOT/"; then
|
||||||
as_user env \
|
as_user env \
|
||||||
|
LOGNAME="$user" \
|
||||||
HOME="$HOME" \
|
HOME="$HOME" \
|
||||||
XDG_CACHE_HOME="$XDG_CACHE_HOME" \
|
XDG_CACHE_HOME="$XDG_CACHE_HOME" \
|
||||||
KISS_COMPRESS="$KISS_COMPRESS" \
|
KISS_COMPRESS="$KISS_COMPRESS" \
|
||||||
|
Loading…
Reference in New Issue
Block a user