sudo-project / sudo

Utility to execute a command as another user
https://www.sudo.ws
Other
1.2k stars 224 forks source link

1.9.16: `sudo.log` vs. `auth.log` end logging #405

Closed opty77 closed 2 weeks ago

opty77 commented 2 months ago

On Devuan GNU/Linux 5.0 (Daedalus) sudo (whether asking for password or not) logs wrong command end timestamp (doubles duration) to /var/log/sudo.log:

Sep  5 15:55:00 2024 : opty : TTY=pts/12 ; PWD=/home/opty ; USER=root ; COMMAND=/bin/bash -c 'echo sleep 60 with password && sleep 60'
Sep  5 15:57:00 2024 : opty : TTY=pts/12 ; PWD=/home/opty ; USER=root ; COMMAND=/bin/bash -c 'echo sleep 60 with password && sleep 60' ; EXIT=0
Sep  5 15:57:00 2024 : opty : TTY=pts/12 ; PWD=/home/opty ; USER=root ; COMMAND=/bin/bash -c 'echo sleep 60 without password && sleep 60'
Sep  5 15:59:00 2024 : opty : TTY=pts/12 ; PWD=/home/opty ; USER=root ; COMMAND=/bin/bash -c 'echo sleep 60 without password && sleep 60' ; EXIT=0

compared to /var/log/auth.log:

2024-09-05T15:55:00.188165+02:00 kiwi sudo 209981 - -     opty : TTY=pts/12 ; PWD=/home/opty ; USER=root ; COMMAND=/bin/bash -c 'echo sleep 60 with password && sleep 60'
2024-09-05T15:56:00.195024+02:00 kiwi sudo 209981 - -     opty : TTY=pts/12 ; PWD=/home/opty ; USER=root ; COMMAND=/bin/bash -c 'echo sleep 60 with password && sleep 60' ; EXIT=0
2024-09-05T15:57:00.218851+02:00 kiwi sudo 209987 - -     opty : TTY=pts/12 ; PWD=/home/opty ; USER=root ; COMMAND=/bin/bash -c 'echo sleep 60 without password && sleep 60'
2024-09-05T15:58:00.229995+02:00 kiwi sudo 209987 - -     opty : TTY=pts/12 ; PWD=/home/opty ; USER=root ; COMMAND=/bin/bash -c 'echo sleep 60 without password && sleep 60' ; EXIT=0
millert commented 2 weeks ago

Fixed in sudo 1.9.16p1, available now.

opty77 commented 2 weeks ago

Works, thanks!