Bug 545 - option -v not working
option -v not working
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.4
PC Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-12 11:46 MDT by Dan
Modified: 2012-03-12 20:44 MDT (History)
0 users

See Also:


Attachments
Patch to fix "sudo -v" in sudo 1.8.4 (402 bytes, patch)
2012-03-12 19:36 MDT, Todd C. Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2012-03-12 11:46:48 MDT
The -v option does not seem to work in 1.8.4. I type 'sudo -v' and it returns to the prompt. I then use sudo with some command say, 'sudo ls' and I am prompted for my password. But the 'sudo -v' command that I ran previously should have prompted for the password if my credentials had expired.

My systems are Arch Linux and sudo is version 1.8.4p2.
Comment 1 Todd C. Miller 2012-03-12 11:52:08 MDT
Were both sudo commands run from the same terminal?  The tty_tickets option is enabled by default on newer sudo versions so "sudo -v" is per-terminal.  You can change this by adding a line in sudoers like:

Defaults !tty_tickets
Comment 2 Dan 2012-03-12 12:14:16 MDT
Yes, the commands were run from the same terminal, one right after the other.
Comment 3 Todd C. Miller 2012-03-12 19:36:28 MDT
Created attachment 335 [details]
Patch to fix "sudo -v" in sudo 1.8.4

The attached patch fixes the problem.
Comment 4 Todd C. Miller 2012-03-12 20:44:41 MDT
Fixed in sudo 1.8.4p4, available now.