mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
1fddc2bab4
commit
53e6d8be6b
2 changed files with 29 additions and 4 deletions
|
@ -550,6 +550,15 @@ notice and this notice are preserved.
|
|||
|
||||
<subsect>
|
||||
<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>
|
||||
The locations of the directories in which user specific files and
|
||||
the user defaults database are stored may be defined in the
|
||||
|
|
|
@ -408,11 +408,28 @@ static void InitialisePathUtilities(void)
|
|||
/* Set up our root paths */
|
||||
NS_DURING
|
||||
{
|
||||
BOOL shouldLoadUserConfig = YES;
|
||||
|
||||
userConfig = [GNUstepConfig() mutableCopy];
|
||||
ASSIGNCOPY(gnustepUserHome, NSHomeDirectoryForUser(NSUserName()));
|
||||
ParseConfigurationFile(
|
||||
[gnustepUserHome stringByAppendingPathComponent: gnustepUserConfigFile],
|
||||
userConfig);
|
||||
#ifdef HAVE_GETEUID
|
||||
/*
|
||||
* 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);
|
||||
DESTROY(userConfig);
|
||||
|
||||
|
@ -434,7 +451,6 @@ static void InitialisePathUtilities(void)
|
|||
Win32NSStringFromRegistry(regkey, @"GNUSTEP_LOCAL_ROOT"));
|
||||
RegCloseKey(regkey);
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Not implemented yet
|
||||
platformApps = Win32FindDirectory(CLSID_APPS);
|
||||
|
|
Loading…
Reference in a new issue