mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 10:08:05 +02:00
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:
parent
12955fcda6
commit
4ff7eeeaae
1 changed files with 6 additions and 6 deletions
12
src/main.c
12
src/main.c
|
|
@ -333,6 +333,12 @@ main (int argc, char *argv[])
|
||||||
{NULL}
|
{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 ()) {
|
if (!g_module_supported ()) {
|
||||||
fprintf (stderr, _("GModules are not supported on your platform!\n"));
|
fprintf (stderr, _("GModules are not supported on your platform!\n"));
|
||||||
exit (1);
|
exit (1);
|
||||||
|
|
@ -398,12 +404,6 @@ main (int argc, char *argv[])
|
||||||
g_free (path);
|
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 */
|
/* Setup runtime directory */
|
||||||
if (g_mkdir_with_parents (NMRUNDIR, 0755) != 0) {
|
if (g_mkdir_with_parents (NMRUNDIR, 0755) != 0) {
|
||||||
nm_log_err (LOGD_CORE, "Cannot create '%s': %s", NMRUNDIR, strerror (errno));
|
nm_log_err (LOGD_CORE, "Cannot create '%s': %s", NMRUNDIR, strerror (errno));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue