Mailinglist Archive: opensuse (1231 mails)

< Previous Next >
Re: [opensuse] own environment variables in init scripts
El lun 04 mar 2013 14:00:42 CLST, Meike Stone escribió:

** what you are trying to do is an horrible bad idea ;P ***
What is horrible on it?

The environment of a process is not the proper place to do this, daemons must sanitize
the environment before starting, not doing that is a security hole.

This is why , for example if you read the apache documentation.

it says "Although these variables are referred to as environment variables, **they are not the same as the environment variables controlled by the underlying operating system *** Instead, these variables are stored and manipulated in an internal Apache structure"

The Question in general is, how to set environment variables global,
so that they are available in init
scripts (example for this is HOSTNAME)

Short answer, you don't. The hostname should be obtained with the appropiate system calls.. in whatever language the applications are written in..

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups