A question of environment ...

10function 10function at ifrance.com
Thu Nov 9 03:04:44 PST 2006


Hello Again !
I was interrested by the effect of environment variables on both dbus-daemon and libdbus users (client/services).
I quickly extracted from the code some calls to getenv or dbus_getenv as shown :

dbus/dbus-bus.c:          s = _dbus_getenv ("DBUS_STARTER_BUS_TYPE");
dbus/dbus-internals.c:      s = _dbus_getenv ("DBUS_FATAL_WARNINGS");
dbus/dbus-internals.c:      const char *p = _dbus_getenv ("DBUS_VERBOSE");
dbus/dbus-internals.c:  setting = _dbus_getenv ("DBUS_TEST_MALLOC_FAILURES");
dbus/dbus-keyring.c:   override = _dbus_getenv ("DBUS_TEST_HOMEDIR");
dbus/dbus-memory.c:      if (_dbus_getenv ("DBUS_MALLOC_FAIL_NTH") != NULL)
dbus/dbus-memory.c:       fail_nth = atoi (_dbus_getenv ("DBUS_MALLOC_FAIL_NTH"));
dbus/dbus-memory.c:      if (_dbus_getenv ("DBUS_MALLOC_FAIL_GREATER_THAN") != NULL)
dbus/dbus-memory.c:          fail_size = atoi (_dbus_getenv ("DBUS_MALLOC_FAIL_GREATER_THAN"));
dbus/dbus-memory.c:      if (_dbus_getenv ("DBUS_MALLOC_GUARDS") != NULL)
dbus/dbus-memory.c:      if (_dbus_getenv ("DBUS_DISABLE_MEM_POOLS") != NULL)
dbus/dbus-memory.c:      if (_dbus_getenv ("DBUS_MALLOC_BACKTRACES") != NULL)
dbus/dbus-sysdeps-unix.c:        tmpdir = getenv("TMPDIR");
dbus/dbus-sysdeps-unix.c:        tmpdir = getenv("TMP");
dbus/dbus-sysdeps-unix.c:        tmpdir = getenv("TEMP");
dbus/dbus-sysdeps-util-unix.c:          s = _dbus_getenv ("DBUS_DEBUG_OUTPUT");
dbus/dbus-sysdeps.c:  s = _dbus_getenv ("DBUS_BLOCK_ON_ABORT");
dbus/dbus-test.c:    test_data_dir = _dbus_getenv ("DBUS_TEST_DATA");

May be i miss something and will get a RTFM for this, but appart the DBUS_MALLOC ones , i don't remind of having seen description and/or admissible values for these environment variables :

DBUS_STARTER_BUS_TYPE	: Path to the BUS, Set before activation of a service ?
DBUS_FATAL_WARNINGS	: 0 or 1, effect unknown
DBUS_VERBOSE		: 0 or 1, enable verbosity ?
DBUS_TEST_MALLOC_FAILURES : 0 or 1,
DBUS_TEST_HOMEDIR
DBUS_MALLOC_FAIL_NTH	: Number of failures
DBUS_MALLOC_FAIL_GREATER_THAN : Maximum allocation size
DBUS_MALLOC_GUARDS
DBUS_MALLOC_BACKTRACES	: 0 or 1 : Keep backtrace of allocations ?
DBUS_DISABLE_MEM_POOLS	: 0 or 1 
DBUS_DEBUG_OUTPUT	: 0 or 1, enable debug output ?
DBUS_BLOCK_ON_ABORT	: 0 or 1 ?
TMPDIR/TMP/TEMP		: Temporary dirs. used for what ?
DBUS_TEST_DATA		:

If someone can complete this list and describe the effect and admissible values , i think this could be added to the official documentation.

Thanks in advance !

Today's piece of secure software is the subject of tomorrow's Bugtraq posting


________________________________________________________________________
iFRANCE, exprimez-vous !
http://web.ifrance.com


More information about the dbus mailing list