Bug 270

Summary: 1.6.9 breaks custom prompts
Product: Sudo Reporter: Martin Pitt <martin.pitt>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: normal    
Version: 1.6.9   
Hardware: PC   
OS: Linux   

Description Martin Pitt 2007-11-14 07:54:29 MST
In Ubuntu we configure sudo with 

  --with-passprompt="[sudo] password for %u:"

to disambiguate it if you do thinks like "sudo passwd", "sudo ssh ...", etc. Also, gksu uses the -p option to set a prompt which it can parse from sudo's output. Both seems to be broken with 1.6.9.

With 1.6.8p12:
$ sudo true
[sudo] password for martin:
$ sudo.old -p GNOME_SUDO_PASS true
GNOME_SUDO_PASS

When I build 1.6.9, I just get:
$ sudo true
Passwort: 
$ sudo -p GNOME_SUDO_PASS true
Passwort: 

This breaks gksu (it just hangs indefinitively) and probably other frontends like kdesudo and kdesu, too.
Comment 1 Martin Pitt 2007-11-14 07:55:14 MST
Sorry for my typo in above description. "sudo.old" is the 1.6.8p12 version which I kept installed for comparisons.
Comment 2 Martin Pitt 2007-11-14 08:21:30 MST
Ah, got it. This is actually a duplicate of bug 180, but it is more serious now since 1.6.9 now uses setlocale(), so that the PAM password prompt appears translated.

Indeed it works again if I call the new sudo with LC_ALL=C. So I guess my current workaround for 1.6.9 for the time being is to disable translation support in sudo by patching out the setlocale() call, until bug 180 is fixed properly.

*** This bug has been marked as a duplicate of bug 180 ***