Bugzilla – Bug 801
The askpass option don't work anymore
Last modified: 2017-09-07 05:50:07 MDT
After the last sudo update from 1.8.20.p2 to 1.8.21.p1 on arch-linux, there is a bug in sudo. When using the askpass option the command is not executed anymore. example with akspass: $ sudo -A touch /sudo-test $ ls -l /sudo-test ls: Zugriff auf '/sudo-test' nicht möglich: Datei oder Verzeichnis nicht gefunden (file not found) But logfile shows: sudo[1057]: user : TTY=pts/0 ; PWD=/home/user/Programme ; USER=root ; COMMAND=/usr/bin/touch /sudo-test sudo has not execute the touch command! My askpass-program for this example was: #!/bin/bash echo 'password' Same example without askpass: $sudo touch /sudo-test [sudo] Passwort für user: $ ls -l /sudo-test -rw-r--r-- 1 root root 0 6. Sep 17:50 /sudo-test Logfile shows: sudo[1081]: user : TTY=pts/0 ; PWD=/home/user/Programme ; USER=root ; COMMAND=/usr/bin/touch /sudo-test This time the command was executed! After downgrade to 1.8.20.p2 the example works even with askpass.
Sorry but I'm unable to reproduce this. I installed Arch in a VM and see the following behavior: [millert@arch ~]$ sudo -V Sudo version 1.8.21p1 Sudoers policy plugin version 1.8.21p1 Sudoers file grammar version 46 Sudoers I/O plugin version 1.8.21p1 [millert@arch ~]$ cat /tmp/askpass #!/bin/sh echo 'password' exit 0 [millert@arch ~]$ SUDO_ASKPASS=/tmp/askpass sudo -A id We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. Sorry, try again. Sorry, try again. sudo: 3 incorrect password attempts This gives me the expected log entry: sudo[892]: millert : 3 incorrect password attempts ; TTY=pts/0 ; PWD=/home/millert ; USER=root ; COMMAND=/usr/bin/id
I'm now able to reproduce the problem.
This is fixed by https://www.sudo.ws/repos/sudo/rev/57f636b6489f
I can confirm, that your patch fix the problem. Thank you for your very quick response. :)
Sudo 1.8.21p2 is out now which includes the fix.