mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
pkexec wrapper: fix gdebi / synaptic
but at cost of checking for passwordless sudo /etc/suders /etc/sudoers.d exceptions. http://forums.whonix.org/t/cannot-use-pkexec/8129/53
This commit is contained in:
parent
32269d32b6
commit
649ec5dfa1
@ -104,14 +104,15 @@ exit_code=0
|
|||||||
|
|
||||||
## lxqt-sudo does not check /etc/sudoers / /etc/sudoers.d exceptions.
|
## lxqt-sudo does not check /etc/sudoers / /etc/sudoers.d exceptions.
|
||||||
## Therefore use 'sudo -l' to see if there is any already existing sudoers exception.
|
## Therefore use 'sudo -l' to see if there is any already existing sudoers exception.
|
||||||
if sudo -l --non-interactive $maybe_switch_to_user --set-home PKEXEC_UID="$PKEXEC_UID" "$@" ; then
|
## Did not work. 'sudo -l' will always exit with exit code '0'.
|
||||||
log_to_journal "sudoers exception: yes"
|
# if sudo -l --non-interactive $maybe_switch_to_user --set-home PKEXEC_UID="$PKEXEC_UID" "$@" ; then
|
||||||
sudo --non-interactive $maybe_switch_to_user --set-home PKEXEC_UID="$PKEXEC_UID" "$@" || { exit_code=$? ; true; };
|
# log_to_journal "sudoers exception: yes"
|
||||||
log_to_journal "sudo --user | exit_code: '$exit_code'"
|
# sudo --non-interactive $maybe_switch_to_user --set-home PKEXEC_UID="$PKEXEC_UID" "$@" || { exit_code=$? ; true; };
|
||||||
exit "$exit_code"
|
# log_to_journal "sudo --user | exit_code: '$exit_code'"
|
||||||
fi
|
# exit "$exit_code"
|
||||||
|
# fi
|
||||||
log_to_journal "sudoers exception: no"
|
#
|
||||||
|
# log_to_journal "sudoers exception: no"
|
||||||
|
|
||||||
if [ "$switch_user" = "true" ]; then
|
if [ "$switch_user" = "true" ]; then
|
||||||
## 'sudo --user user' clears environment variables such as PATH.
|
## 'sudo --user user' clears environment variables such as PATH.
|
||||||
|
Loading…
Reference in New Issue
Block a user