Bug 456719

Summary: -p option doesn't work when the current locale is not english
Product: [Fedora] Fedora Reporter: Miguel Angel Perez <mangelp>
Component: sudoAssignee: Peter Vrabec <pvrabec>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: kzak
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-31 13:19:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.