Bug 274

Summary: patch adding a %p to available variables for prompt
Product: Sudo Reporter: Bdale Garbee <bdale>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: normal    
Version: 1.6.9   
Hardware: All   
OS: All   
URL: http://bugs.debian.org/454409
Attachments: proposed patch adding %p to prompt variables

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