From d4e02de43a068a22a9fd1b15c4d2b314baf97283 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Tue, 22 Oct 2019 09:04:44 -0400 Subject: [PATCH] set SUDO_ASKPASS for pkexec wrapper when using sudo --askpass --- usr/bin/pkexec.security-misc | 3 ++- usr/lib/security-misc/askpass | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 usr/lib/security-misc/askpass diff --git a/usr/bin/pkexec.security-misc b/usr/bin/pkexec.security-misc index 0131543..0d6b516 100755 --- a/usr/bin/pkexec.security-misc +++ b/usr/bin/pkexec.security-misc @@ -87,7 +87,8 @@ PATH="$(sudo --non-interactive /usr/lib/security-misc/echo-path)" export PATH if [ "$use_sudo" = "true" ]; then - sudo --askpass --user "$user_pkexec_wrapper" --set-home "$@" + SUDO_ASKPASS="/usr/lib/security-misc/askpass" \ + sudo --askpass --user "$user_pkexec_wrapper" --set-home "$@" else lxqt-sudo "$@" fi diff --git a/usr/lib/security-misc/askpass b/usr/lib/security-misc/askpass new file mode 100755 index 0000000..0a7cb83 --- /dev/null +++ b/usr/lib/security-misc/askpass @@ -0,0 +1,10 @@ +#!/bin/bash + +## Copyright (C) 2019 - 2019 ENCRYPTED SUPPORT LP +## See the file COPYING for copying conditions. + +set -e + +title="$0: password required for $(whoami) to perform action as superuser" + +zenity --password --title="$title"