app_containers: Force the use of SUDO_ASKPASS
This commit is contained in:
parent
edddafda26
commit
8ce1f690b7
|
@ -59,7 +59,7 @@ if [ "$CONTAINER_RUN_AS_ROOT" = true ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
homedir=/
|
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
|
if [ "$(echo "$line" | cut -d: -f3)" == "$run_as" ]; then
|
||||||
homedir="$(echo "$line" | cut -d: -f6)"
|
homedir="$(echo "$line" | cut -d: -f6)"
|
||||||
break
|
break
|
||||||
|
@ -87,7 +87,7 @@ xhost +si:localuser:\#$user_on_host
|
||||||
# Note: any new device plugged in when the container is running would not
|
# Note: any new device plugged in when the container is running would not
|
||||||
# be added properly here.
|
# be added properly here.
|
||||||
for input in $(find /dev/input -type c); do
|
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
|
done
|
||||||
|
|
||||||
sudo -A systemd-nspawn -M $CONTAINER_NAME \
|
sudo -A systemd-nspawn -M $CONTAINER_NAME \
|
||||||
|
|
Loading…
Reference in New Issue