launch_daemon: Set some HOME/LC_TYPE defaults.

This commit is contained in:
Axel Dörfler
2015-07-22 20:43:40 +02:00
parent a3211522d9
commit bd1c9bf338
+7
View File
@@ -726,6 +726,10 @@ LaunchDaemon::_StartSession(const char* login)
if (setuid(user) != 0)
exit(EXIT_FAILURE);
BString home="HOME=\"";
home << passwd->pw_dir << "\"";
putenv(home.String());
// TODO: This leaks the parent application
be_app = NULL;
@@ -768,6 +772,9 @@ LaunchDaemon::_SetupEnvironment()
safemode << (IsSafeMode() ? "yes" : "no");
putenv(safemode.String());
// Default locale settings
putenv("LC_TYPE=en_US.UTF-8");
}