Bug 274 - patch adding a %p to available variables for prompt
patch adding a %p to available variables for prompt
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.9
All All
: normal enhancement
Assigned To: Todd C. Miller
http://bugs.debian.org/454409
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-28 13:54 MST by Bdale Garbee
Modified: 2008-01-05 19:03 MST (History)
0 users

See Also:


Attachments
proposed patch adding %p to prompt variables (5.17 KB, patch)
2007-12-28 13:56 MST, Bdale Garbee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bdale Garbee 2007-12-28 13:54:50 MST
After some discussion about the confusion that can occur when nesting sudo and ssh invocations in the Debian bug report 454409, Patrick Schoenfeld offered up a patch that adds a %p to the list of variables available when defining prompts.  This new variable always refers to the user for which a password is being requested.  

I like this patch and am accepting it for my build of 1.6.9p10 for Debian, and would like to suggest/request that you accept it upstream for some future version.  

Patch without the Debian-specific bits attached for your convenience... I'm building using --with-passprompt="[sudo] password for %p: ".

Thanks!
Comment 1 Bdale Garbee 2007-12-28 13:56:16 MST
Created attachment 218 [details]
proposed patch adding %p to prompt variables
Comment 2 Todd C. Miller 2008-01-05 19:03:55 MST
Merged in sudo 1.6.9p11