Bug 456719 - -p option doesn't work when the current locale is not english
Summary: -p option doesn't work when the current locale is not english
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: sudo
Version: 8
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-25 19:32 UTC by Miguel Angel Perez
Modified: 2008-07-31 13:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-31 13:19:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miguel Angel Perez 2008-07-25 19:32:08 UTC
Description of problem:

Using -p option doesn't work if the locale is not english. Instead of the custom
prompt text it shows the translation of the default prompt.

Version-Release number of selected component (if applicable):
sudo-1.6.9p4-6.fc8

How reproducible:
Always

Steps to Reproduce:
1. Configure sudoers file to give you permission to use sudo to execute whoami
as root or all commands.
3. Change your locale to a non-english one like es_ES.utf8 or it_IT.utf8
  # export LC_ALL="es_ES.utf8"
2. Call sudo with a custom prompt. 
  # sudo -p "[MyCustomPrompt]: " whoami
  
Actual results:
In each case it shows the translated default prompt message except in english
locales.

 - For the es_ES.utf8:
     Contraseña: 
 - For the it_IT.utf8:
     Parola d'ordine:
 - For the en_US.utf8:
      [MyCustomPrompt]:
 - For the en_GB.utf8:
      [MyCustomPrompt]:

Expected results:
In every case it should output the prompt: 
  [MyCustomPrompt]:

Additional info:
# uname -a
  Linux hyperion.hegemony 2.6.25.10-47.fc8 #1 SMP Mon Jul 7 18:39:51 EDT 2008
i686 i686 i386 GNU/Linux

# locale
LANG=es_ES.UTF-8
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=

Comment 1 Lukas Kuklinek 2008-07-31 11:20:49 UTC
This is already fixed in Fedora 9.


Note You need to log in before you can comment on or make changes to this bug.