tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* 'su' corrupting environ vars ?
@ 2000-04-14 11:22 Massimo Gais
  0 siblings, 0 replies; only message in thread
From: Massimo Gais @ 2000-04-14 11:22 UTC (permalink / raw)
  To: tru64-unix-managers

[-- 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..." 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-04-14 11:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-14 11:22 'su' corrupting environ vars ? Massimo Gais

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