Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LIBPATH and /etc/environment

57 views
Skip to first unread message

mala...@iname.com

unread,
Feb 5, 1999, 3:00:00 AM2/5/99
to
I have two 4.2.1 systems where I define LIBPATH in /etc/environment. On the
first box, no process exec()'d by init inherits the defined LIBPATH (i.e.
LIBPATH in any child process of init has undefined LIBPATH). On the second,
LIBPATH is inherited from init (thus from /etc/environment) just fine. I
can't find any reason (I _think_ I've investigated all avenues of the setuid
and setgid issues surrounding LIBPATH) why the first box doesn't inherit
LIBPATH.

Just to be sure I wasn't doing something quite obviously stupid, I put
/usr/bin/printenv after rc.boot in inittab and that's how I verified that init
apparently wasn't getting the LIBPATH from /etc/environment.

Any suggestions on where to look to fix this?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Gary R. Hook

unread,
Feb 11, 1999, 3:00:00 AM2/11/99
to
Helmut Leininger wrote:
>
> the handling of LIBPATH is a special one. It does not get passed
> through "su" either.
> You may specify it in /etc/profile else try using LD_LIBRARY_PATH
> instead.

There is no LD_LIBRARY_PATH on AIX. LIBPATH is the variable, and it
does not survive the gaining of privilege.

--
Gary R. Hook / AIX Kernel Development, IBM / These opinions are _MINE_
________________________________________________________________________
A piece of canvas is only the beginning
It takes on character with every loving stroke
This thing of beauty is the passion of an artist's heart
By God's design, we are a skin kaleidoscope "Colored people", dc Talk

mala...@iname.com

unread,
Feb 19, 1999, 3:00:00 AM2/19/99
to
In article <79f59c$vpu$1...@nnrp1.dejanews.com>,

mala...@iname.com wrote:
> I have two 4.2.1 systems where I define LIBPATH in /etc/environment. On the
> first box, no process exec()'d by init inherits the defined LIBPATH (i.e.
> LIBPATH in any child process of init has undefined LIBPATH). On the second,
> LIBPATH is inherited from init (thus from /etc/environment) just fine. I
> can't find any reason (I _think_ I've investigated all avenues of the setuid
> and setgid issues surrounding LIBPATH) why the first box doesn't inherit
> LIBPATH.
>
> Just to be sure I wasn't doing something quite obviously stupid, I put
> /usr/bin/printenv after rc.boot in inittab and that's how I verified that init
> apparently wasn't getting the LIBPATH from /etc/environment.
>
> Any suggestions on where to look to fix this?

I found the answer: I had two LIBPATH lines in my /etc/environment. For some
reason, this caused LIBPATH to be undefined and thus nothing in inittab
inherited a LIBPATH. Now that makes absolutely no sense, but there it is.

Norman Levin

unread,
Feb 21, 1999, 3:00:00 AM2/21/99
to
It is my understanding that LIBPATH will NOT be propagated in
/etc/environment.
You could login and su and gain authority. LIBPATH could be a security
violation.

IBM, how much would it cost to add a comment line into /etc/environment that
LIBPATH is not propagated. How many customer man hours/months etc. have to be
wasted
while you say "Oh, it is documented on page nn in an out of print manual"
--
Norman Levin
vm/dynAmIX inc.

Scott L. Fields

unread,
Feb 22, 1999, 3:00:00 AM2/22/99
to
Welcome to open systems. You can't please everyone and you can't
bulletproof everything.

Anyway, "init" does use the /etc/environment file to populate system
environment variables (at least recent versions).

The man page for init states:

the init command reads the /etc/environment file and copies any
assignments found
in that file into the environment passed to all of its subprocesses

When you modify a system script or resource, you have to be doubly
sure you have everything right. Your solution is not as simple as you
would state.

By the way, this is in the Commands Reference and HARDLY out of
print. In fact, it is even online on the web.

http://www.rs6000.ibm.com/library

Since the "/etc/environment" file is one that can change, you just
can't replace it with a new version with all kind of warnings. You risk
removing or corrupting changes that an end user MAY have purposely
added.

In most cases, online pubs are the best place to put this. You can search
them easily, they are indexed, and the WEB based version on IBM's web
site has the latest version.

IMHO
Norman Levin wrote in message <36D06ED2...@ibm.net>...

Norman Levin

unread,
Feb 22, 1999, 3:00:00 AM2/22/99
to

From:
"Scott L. Fields" <slfi...@metronet.com>


> Since the "/etc/environment" file is one that can change, you just
> can't replace it with a new version with all kind of warnings. You risk
> removing or corrupting changes that an end user MAY have purposely
> added.

This file is in /etc and is NOT an end user modifiable file.
It is in /etc and is often modified by
administrators. Currently, the file contains three
warnings. It would not hurt to add a 4th


that LIBPATH is not propagated.

--
Norman Levin
vm/dynAmIX inc.


Scott L. Fields

unread,
Feb 23, 1999, 3:00:00 AM2/23/99
to
What are you talking about? I stated "/etc/environment", so unless you
don't know how to read a file path, you already know this is in /etc.

And if you want to be specific, then when I say "end user", I am referring
to the person that has adminstrative authority over that machine. In
my case, this is many people, since all of our people use RS/6000's
as their personal workstations, and have root authority.

And why stop at a fourth line? How about 5? No, six! No, SIXTY!

The three lines that ARE there state what NEEDS to be known.
This file is ONLY for defining environment variables that will be
global to the system.

As the previous person who started this stated, it was a problem with
how he had this defined on his system. Quoted from his response:

I found the answer: I had two LIBPATH lines in my /etc/environment.
For some
reason, this caused LIBPATH to be undefined and thus nothing in inittab
inherited a LIBPATH. Now that makes absolutely no sense, but there it
is.

So, this whole discussion is a NON-ISSUE, anyway. Now, let's let this
thread DIE!

Norman Levin wrote in message <36D21BBA...@ibm.net>...

0 new messages