Final proper fix for the initialization of: captive-sandbox-server(8)
[captive.git] / src / client / sandbox-server / main.c
index 7735da7..ce88748 100644 (file)
@@ -602,11 +602,6 @@ gboolean fragile;
                        |G_LOG_LEVEL_DEBUG
                        ));
 
-       /* Do not do it later than chroot_setup() as it requires it.
-        * On the other hand it is SETUID-fragile this way.
-        */
-       captive_standalone_init();
-
        fatal_argv0=argv[0];
        fragile=(getuid()!=geteuid() || getuid()==0 || geteuid()==0);
 
@@ -618,6 +613,8 @@ gboolean fragile;
                chroot_setup(TRUE);
 #endif /* MAINTAINER_MODE */
 
+       captive_standalone_init();
+
        captive_options_init(&options);
        captive_options=&options;       /* for parsing by 'CAPTIVE_POPT_INCLUDE' */