From 8ce1f690b7c9c4bf9da4420c10655a9a5c35d13b Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 31 Dec 2022 15:21:20 -0500 Subject: [PATCH] app_containers: Force the use of SUDO_ASKPASS --- app_containers/.local/bin/run_app_container | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app_containers/.local/bin/run_app_container b/app_containers/.local/bin/run_app_container index 147b1a8..44d5894 100755 --- a/app_containers/.local/bin/run_app_container +++ b/app_containers/.local/bin/run_app_container @@ -59,7 +59,7 @@ if [ "$CONTAINER_RUN_AS_ROOT" = true ]; then fi homedir=/ -for line in $(sudo cat /var/lib/machines/$CONTAINER_NAME/etc/passwd); do +for line in $(sudo -A cat /var/lib/machines/$CONTAINER_NAME/etc/passwd); do if [ "$(echo "$line" | cut -d: -f3)" == "$run_as" ]; then homedir="$(echo "$line" | cut -d: -f6)" break @@ -87,7 +87,7 @@ xhost +si:localuser:\#$user_on_host # Note: any new device plugged in when the container is running would not # be added properly here. for input in $(find /dev/input -type c); do - sudo setfacl -m u:$user_on_host:rw- $input + sudo -A setfacl -m u:$user_on_host:rw- $input done sudo -A systemd-nspawn -M $CONTAINER_NAME \