tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Massimo Gais <mgais () na ! astro ! it>
To: tru64-unix-managers
Subject: 'su' corrupting environ vars ?
Date: Fri, 14 Apr 2000 11:22:21 +0000	[thread overview]
Message-ID: <96079343919477.tru64-unix-managers.marc@archive.invalid> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

Hello Tru64 managers,

I found a weird problem with 'su', that is it looks like it's trashing 
some environment variables.

The 'man su' says:
  Except in a case where the - option is used, the user	environment is
  unchanged except for HOME, SHELL, USER, and LOGNAME which are	taken from
  the password file for	the user being substituted (see	environ).
  
Notably, this happens to me with LD_LIBRARY_PATH.

Please read here:

mgais % LD_LIBRARY_PATH=/usr/lib:/usr/lib/X11:/usr/shlib
mgais % export LD_LIBRARY_PATH                          
mgais % echo $LD_LIBRARY_PATH                           
/usr/lib:/usr/lib/X11:/usr/shlib

and now...

mgais % su
Password:
# echo $LD_LIBRARY_PATH
�53�141�/usr/lib:/usr/lib/X11:/usr/shlib

With 'od' I could see that those weird chars are:
0xff _userUID_ 0xff _userGID_ 0xff

The problem is the same if I start with sh/bash/csh user shell
Root shell is sh

The problem seems to affect only for DU v4.0d/v4.0f machines,
not for Tru64 v5.0

If I type 'su otheruser', (with a sh/bash user) the
LD_LIBRARY_PATH will be unset

Of course, if I type 'su -', the variable is re-initialized correctly.

Could you please check if on your machine there is such a problem,
or if it should be something related to my login scripts ?

Thank you in advance

Massimo Gais                               <mgais@na.astro.it>
----

			"UNIX is user friendly. It's just selective 
				about who its friends are..." 

                 reply	other threads:[~2000-04-14 11:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox