main: setenv(GIO_USE_VFS=local) *very* early

See https://bugzilla.gnome.org/show_bug.cgi?id=701322 for why we
should order calls to setenv() as early as possible.
This commit is contained in:
Colin Walters 2013-06-14 13:26:28 -04:00
parent 12955fcda6
commit 4ff7eeeaae

View file

@ -333,6 +333,12 @@ main (int argc, char *argv[])
{NULL}
};
/* Make GIO ignore the remote VFS service; otherwise it tries to use the
* session bus to contact the remote service, and NM shouldn't ever be
* talking on the session bus. See rh #588745
*/
setenv ("GIO_USE_VFS", "local", 1);
if (!g_module_supported ()) {
fprintf (stderr, _("GModules are not supported on your platform!\n"));
exit (1);
@ -398,12 +404,6 @@ main (int argc, char *argv[])
g_free (path);
}
/* Make GIO ignore the remote VFS service; otherwise it tries to use the
* session bus to contact the remote service, and NM shouldn't ever be
* talking on the session bus. See rh #588745
*/
setenv ("GIO_USE_VFS", "local", 1);
/* Setup runtime directory */
if (g_mkdir_with_parents (NMRUNDIR, 0755) != 0) {
nm_log_err (LOGD_CORE, "Cannot create '%s': %s", NMRUNDIR, strerror (errno));