Mailinglist Archive: opensuse-bugs (5398 mails)

< Previous Next >
[Bug 279934] ssh doesn't send locale environment when a command is executed remotely
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 4 Jun 2007 09:25:58 -0600 (MDT)
  • Message-id: <20070604152558.E184C10D6@xxxxxxxxxxxxxxxxxxxxxx>
https://bugzilla.novell.com/show_bug.cgi?id=279934


nadvornik@xxxxxxxxxx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|anicka@xxxxxxxxxx           |werner@xxxxxxxxxx




------- Comment #5 from nadvornik@xxxxxxxxxx  2007-06-04 09:25 MST -------
As I understand the scripts, exporting SSH_SENDS_LOCALE=yes means "do not touch
any locale variable", right?

> Only if both a locale variable and a tty is provided by
> the ssh connection the scripts /etc/profile.d/sh.utf8 and
> /etc/profile.d/csh.utf8 are called to possible edit the locale variable to
> reflect the UTF-8 capability of the local terminal line.

Sorry, but I read it just opposite:

    if test -z "$SSH_SENDS_LOCALE" ; then                                       
        if test -r /etc/sysconfig/language -a -r /etc/profile.d/sh.utf8 ; then  
            tmp="$(. /etc/sysconfig/language; echo $AUTO_DETECT_UTF8)"          
            test "$tmp" = "yes" && . /etc/profile.d/sh.utf8                     
            unset tmp                                                           
        fi                                                                      
    fi                                                                          

What I need is to export SSH_SENDS_LOCALE=yes also in situations, when the
shell is called from sshd, there is no tty and the locale variables are set.

This change should do it:
--- sh.ssh.orig 2005-03-03 11:48:10.000000000 +0100
+++ sh.ssh      2007-06-04 17:15:32.000000000 +0200
@@ -20,7 +20,7 @@
     return 1
 }

-if test -n "$SSH_TTY" && test_lc ; then
+if test -n "$SSH_CONNECTION" && test_lc ; then
     SSH_SENDS_LOCALE=yes
     export SSH_SENDS_LOCALE
 fi


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

< Previous Next >
References