mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-12 00:51:08 +00:00
More configuration tweaks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21827 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2368855f8b
commit
ccd9fa4f7d
2 changed files with 29 additions and 4 deletions
|
@ -550,6 +550,15 @@ notice and this notice are preserved.
|
||||||
|
|
||||||
<subsect>
|
<subsect>
|
||||||
<heading>.GNUstep.conf files</heading>
|
<heading>.GNUstep.conf files</heading>
|
||||||
|
<p>
|
||||||
|
The user specific configuration file is read after the system
|
||||||
|
configuration file and may generally override values from the
|
||||||
|
main file. To prevent the use specific file from being read,
|
||||||
|
the system manager may define GNUSTEP_USER_CONFIG_FILE in the
|
||||||
|
main file to be an empty string.<br />
|
||||||
|
In any case, the user specific file is <em>not</em> read if a
|
||||||
|
program is running setuid.
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The locations of the directories in which user specific files and
|
The locations of the directories in which user specific files and
|
||||||
the user defaults database are stored may be defined in the
|
the user defaults database are stored may be defined in the
|
||||||
|
|
|
@ -408,11 +408,28 @@ static void InitialisePathUtilities(void)
|
||||||
/* Set up our root paths */
|
/* Set up our root paths */
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
|
BOOL shouldLoadUserConfig = YES;
|
||||||
|
|
||||||
userConfig = [GNUstepConfig() mutableCopy];
|
userConfig = [GNUstepConfig() mutableCopy];
|
||||||
ASSIGNCOPY(gnustepUserHome, NSHomeDirectoryForUser(NSUserName()));
|
ASSIGNCOPY(gnustepUserHome, NSHomeDirectoryForUser(NSUserName()));
|
||||||
ParseConfigurationFile(
|
#ifdef HAVE_GETEUID
|
||||||
[gnustepUserHome stringByAppendingPathComponent: gnustepUserConfigFile],
|
/*
|
||||||
userConfig);
|
* A program which is running setuid cannot be trusted
|
||||||
|
* to pick up user specific config.
|
||||||
|
*/
|
||||||
|
if (getuid() != geteuid())
|
||||||
|
{
|
||||||
|
shouldLoadUserConfig = NO;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (shouldLoadUserConfig == YES)
|
||||||
|
{
|
||||||
|
NSString *file;
|
||||||
|
|
||||||
|
file = [gnustepUserHome stringByAppendingPathComponent:
|
||||||
|
gnustepUserConfigFile];
|
||||||
|
ParseConfigurationFile(file, userConfig);
|
||||||
|
}
|
||||||
ExtractValuesFromConfig(userConfig);
|
ExtractValuesFromConfig(userConfig);
|
||||||
DESTROY(userConfig);
|
DESTROY(userConfig);
|
||||||
|
|
||||||
|
@ -434,7 +451,6 @@ static void InitialisePathUtilities(void)
|
||||||
Win32NSStringFromRegistry(regkey, @"GNUSTEP_LOCAL_ROOT"));
|
Win32NSStringFromRegistry(regkey, @"GNUSTEP_LOCAL_ROOT"));
|
||||||
RegCloseKey(regkey);
|
RegCloseKey(regkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Not implemented yet
|
// Not implemented yet
|
||||||
platformApps = Win32FindDirectory(CLSID_APPS);
|
platformApps = Win32FindDirectory(CLSID_APPS);
|
||||||
|
|
Loading…
Reference in a new issue