More configuration updates to lock down the system.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21899 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2005-10-28 22:21:36 +00:00
parent 593f86be62
commit 358d5b0799
6 changed files with 65 additions and 8 deletions

View file

@ -24,6 +24,8 @@
specified by --with-config-file= or in $GNUSTEP_MAKEFILES/config.make specified by --with-config-file= or in $GNUSTEP_MAKEFILES/config.make
Add --disable-importing-config-file for consistency with makefiles Add --disable-importing-config-file for consistency with makefiles
package ... not sure we need to keep this option. package ... not sure we need to keep this option.
Add --disable-environment-config-file to prevent use of the
GNUSTEP_CONFIG_FILE enviropnment variable.
* configure: regenerate * configure: regenerate
* Headers/Additions/GNUstepBase/config.h.in: regenerate to include * Headers/Additions/GNUstepBase/config.h.in: regenerate to include
new path definitions produced by configure script. new path definitions produced by configure script.

View file

@ -481,7 +481,10 @@ notice and this notice are preserved.
on. On a GNU/Linux system, the default would be on. On a GNU/Linux system, the default would be
/etc/GNUstep/GNUstep.conf, for instance.<br /> /etc/GNUstep/GNUstep.conf, for instance.<br />
The location of this file can be overridden using the The location of this file can be overridden using the
GNUSTEP_CONFIG_FILE environment variable.<br /> GNUSTEP_CONFIG_FILE environment variable (unless the base libarary
had this feature specifically turned off using the
<code>--disable-environment-config-file</code> option when the
<code>configure</code> script was run prior to building it.<br />
The configuration file is not actually required to exist. The configuration file is not actually required to exist.
If it does not exist, then default values will be used If it does not exist, then default values will be used
for the standard path locations.<br /> for the standard path locations.<br />

View file

@ -15,22 +15,22 @@
/* Set to location of the GNUstep configuration file */ /* Set to location of the GNUstep configuration file */
#undef GNUSTEP_CONFIG_FILE #undef GNUSTEP_CONFIG_FILE
/* GNUstep local root */ /* Built in default value for GNUstep local root */
#undef GNUSTEP_TARGET_LOCAL_ROOT #undef GNUSTEP_TARGET_LOCAL_ROOT
/* GNUstep network root */ /* Built in default value for GNUstep network root */
#undef GNUSTEP_TARGET_NETWORK_ROOT #undef GNUSTEP_TARGET_NETWORK_ROOT
/* GNUstep system root */ /* Built in default value for GNUstep system root */
#undef GNUSTEP_TARGET_SYSTEM_ROOT #undef GNUSTEP_TARGET_SYSTEM_ROOT
/* GNUstep user config file */ /* Built in default value for GNUstep user config file */
#undef GNUSTEP_TARGET_USER_CONFIG_FILE #undef GNUSTEP_TARGET_USER_CONFIG_FILE
/* GNUstep user defaults directory */ /* Built in default value for GNUstep user defaults directory */
#undef GNUSTEP_TARGET_USER_DEFAULTS_DIR #undef GNUSTEP_TARGET_USER_DEFAULTS_DIR
/* GNUstep user directory */ /* Built in default value for GNUstep user directory */
#undef GNUSTEP_TARGET_USER_DIR #undef GNUSTEP_TARGET_USER_DIR
/* Define if this constant is defined */ /* Define if this constant is defined */
@ -378,6 +378,9 @@
/* Define if your system needs to have short/int word aligned */ /* Define if your system needs to have short/int word aligned */
#undef NEED_WORD_ALIGNMENT #undef NEED_WORD_ALIGNMENT
/* Disable GNUSTEP_CONFIG_FILE environment variable */
#undef OPTION_NO_ENVIRONMENT
/* Define to the address where bug reports for this package should be sent. */ /* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT

View file

@ -385,7 +385,7 @@ GNUstepConfig(void)
conf = [[NSMutableDictionary alloc] initWithCapacity: 32]; conf = [[NSMutableDictionary alloc] initWithCapacity: 32];
/* Now we source the configuration file if it exists */ /* Now we source the configuration file if it exists */
#if !defined(OPTION_NO_ENVIRONMENT) #if !OPTION_NO_ENVIRONMENT
file = [[[NSProcessInfo processInfo] environment] file = [[[NSProcessInfo processInfo] environment]
objectForKey: @"GNUSTEP_CONFIG_FILE"]; objectForKey: @"GNUSTEP_CONFIG_FILE"];
#endif #endif

31
configure vendored
View file

@ -846,6 +846,7 @@ if test -n "$ac_init_help"; then
Optional Features: Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-environment-config-file Disable use of the GNUSTEP_CONFIG_FILE environment variable
--disable-importing-config-file Disable importing the existing GNUstep configuration file --disable-importing-config-file Disable importing the existing GNUstep configuration file
--enable-procfs Use /proc filesystem (default) --enable-procfs Use /proc filesystem (default)
--enable-procfs-psinfo Use /proc/%pid% to get info --enable-procfs-psinfo Use /proc/%pid% to get info
@ -1349,6 +1350,36 @@ echo "$as_me:$LINENO: result: $GNUSTEP_CONFIG_FILE" >&5
echo "${ECHO_T}$GNUSTEP_CONFIG_FILE" >&6 echo "${ECHO_T}$GNUSTEP_CONFIG_FILE" >&6
#---------------------------------------------------------------------
# Whether the GNUstep.conf file path can be set in the environment
#---------------------------------------------------------------------
echo "$as_me:$LINENO: checking whether the GNUstep.conf file path can be set in the environment" >&5
echo $ECHO_N "checking whether the GNUstep.conf file path can be set in the environment... $ECHO_C" >&6
# Check whether --enable-environment-config-file or --disable-environment-config-file was given.
if test "${enable_environment_config_file+set}" = set; then
enableval="$enable_environment_config_file"
ac_cv_environment_config_file=$enableval
else
ac_cv_environment_config_file="yes"
fi;
if test "$ac_cv_environment_config_file" = "no"; then
cat >>confdefs.h <<\_ACEOF
#define OPTION_NO_ENVIRONMENT 0
_ACEOF
echo "$as_me:$LINENO: result: no: disabled from the command-line" >&5
echo "${ECHO_T}no: disabled from the command-line" >&6
else
cat >>confdefs.h <<\_ACEOF
#define OPTION_NO_ENVIRONMENT 1
_ACEOF
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
fi
# #
# Set 'standard' defaults for values from configuration file. # Set 'standard' defaults for values from configuration file.
# #

View file

@ -48,6 +48,24 @@ AC_ARG_WITH(config-file,
AC_MSG_RESULT($GNUSTEP_CONFIG_FILE) AC_MSG_RESULT($GNUSTEP_CONFIG_FILE)
AC_SUBST(GNUSTEP_CONFIG_FILE) AC_SUBST(GNUSTEP_CONFIG_FILE)
#---------------------------------------------------------------------
# Whether the GNUstep.conf file path can be set in the environment
#---------------------------------------------------------------------
AC_MSG_CHECKING([whether the GNUstep.conf file path can be set in the environment])
AC_ARG_ENABLE(environment-config-file,
[--disable-environment-config-file Disable use of the GNUSTEP_CONFIG_FILE environment variable],
ac_cv_environment_config_file=$enableval,
ac_cv_environment_config_file="yes")
if test "$ac_cv_environment_config_file" = "no"; then
AC_DEFINE(OPTION_NO_ENVIRONMENT, 0,
[Enable GNUSTEP_CONFIG_FILE environment variable])
AC_MSG_RESULT([no: disabled from the command-line])
else
AC_DEFINE(OPTION_NO_ENVIRONMENT, 1,
[Disable GNUSTEP_CONFIG_FILE environment variable])
AC_MSG_RESULT([yes])
fi
# #
# Set 'standard' defaults for values from configuration file. # Set 'standard' defaults for values from configuration file.
# #