mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +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
|
@ -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…
Add table
Add a link
Reference in a new issue