launch_daemon: Set some HOME/LC_TYPE defaults.
This commit is contained in:
@@ -726,6 +726,10 @@ LaunchDaemon::_StartSession(const char* login)
|
|||||||
if (setuid(user) != 0)
|
if (setuid(user) != 0)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
||||||
|
BString home="HOME=\"";
|
||||||
|
home << passwd->pw_dir << "\"";
|
||||||
|
putenv(home.String());
|
||||||
|
|
||||||
// TODO: This leaks the parent application
|
// TODO: This leaks the parent application
|
||||||
be_app = NULL;
|
be_app = NULL;
|
||||||
|
|
||||||
@@ -768,6 +772,9 @@ LaunchDaemon::_SetupEnvironment()
|
|||||||
safemode << (IsSafeMode() ? "yes" : "no");
|
safemode << (IsSafeMode() ? "yes" : "no");
|
||||||
|
|
||||||
putenv(safemode.String());
|
putenv(safemode.String());
|
||||||
|
|
||||||
|
// Default locale settings
|
||||||
|
putenv("LC_TYPE=en_US.UTF-8");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user