Updates proxy check fails in whonix-ws-15

Information

ID: 1001
PHID: PHID-TASK-2dxobbn6uq2ox5bq3dcu
Author: marmarek
Status at Migration Time: resolved
Priority at Migration Time: Needs Triage

Description

Recent test runs report failure of whonixcheck, I think relevant lines:

Jan 05 02:51:27 host sudo[1882]: pam_exec(sudo:auth): /usr/lib/security-misc/pam-abort-on-locked-password failed: exit code 1
Jan 05 02:51:27 host sudo[1882]:     root : PAM authentication error: System error ; TTY=unknown ; PWD=/ ; USER=updatesproxycheck ; ENV=UWT_DEV_PASSTHROUGH=1 ; COMMAND=/usr/bin/curl --silent http://127.0.0.1:8082/
WARNING: Execution of /usr/bin/apt-get prevented by /etc/uwt.d/40_qubes.conf because no torified Qubes updates proxy found.

The exact command is: qvm-run -ap whonix-ws-15 'LC_ALL=C whonixcheck --verbose --leak-tests --cli'
Full output: https://openqa.qubes-os.org/tests/15305/file/whonixcheck-whonixcheck-whonix-ws-15.log

This may be related to not setting empty root password anymore.

More info extracted from logs:

[2021-01-04 21:51:10] [   16.144317] torified-updates-proxy-check[538]: + true
[2021-01-04 21:51:10] [   16.146402] torified-updates-proxy-check[538]: ++ sudo -u updatesproxycheck UWT_DEV_PASSTHROUGH=1 curl --silent http://127.0.0.1:8082/
[2021-01-04 21:51:10] [   16.226376] sudo[629]: pam_exec(sudo:auth): /usr/lib/security-misc/pam-abort-on-locked-password failed: exit code 1
[2021-01-04 21:51:10] [   16.226983] torified-updates-proxy-check[538]: /usr/lib/security-misc/pam-abort-on-locked-password failed: exit code 1
[2021-01-04 21:51:10] [   16.230002] torified-updates-proxy-check[538]: sudo: PAM authentication error: System error
[2021-01-04 21:51:10] [   16.231315] sudo[629]:     root : PAM authentication error: System error ; TTY=unknown ; PWD=/ ; USER=updatesproxycheck ; ENV=UWT_DEV_PASSTHROUGH=1 ; COMMAND=/usr/bin/curl --silent http://127.0.0.1:8082/

Looks like /usr/lib/security-misc/pam-abort-on-locked-password prevents root from using sudo (if there is no root password set). Since torified-updates-proxy-check is started as root (systemd service?), perhaps sudo usage is not needed there and simple runuser or even setpriv would be enough?

Comments


Patrick

2021-01-05 06:07:18 UTC


marmarek

2021-01-05 17:54:50 UTC


marmarek

2021-01-08 14:28:09 UTC


Patrick

2021-01-09 06:43:58 UTC


Patrick

2021-01-24 11:08:04 UTC