Bug 270 - 1.6.9 breaks custom prompts
1.6.9 breaks custom prompts
Status: RESOLVED DUPLICATE of bug 180
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.9
PC Linux
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-14 07:54 MST by Martin Pitt
Modified: 2007-11-14 08:21 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***