Fixed captive-sandbox-server(8) regarding: captive_standalone_init()
[captive.git] / src / client / sandbox-server / main.c
index cd24a72..7735da7 100644 (file)
@@ -41,6 +41,7 @@
 #include <sys/file.h>
 #include <sys/resource.h>
 #include <orbit/orb-core/corba-defs.h>
+#include "captive/client.h"
 
 #ifdef HAVE_ORBIT_LINK
 char *link_get_tmpdir(void);
@@ -601,6 +602,11 @@ 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);
 
@@ -612,14 +618,6 @@ gboolean fragile;
                chroot_setup(TRUE);
 #endif /* MAINTAINER_MODE */
 
-       /* Initialize the i18n stuff */
-       setlocale(LC_ALL,"");
-       bindtextdomain(PACKAGE,LOCALEDIR);
-       textdomain(PACKAGE);
-
-       /* Initialize GObject subsystem of GLib. */
-       g_type_init();
-
        captive_options_init(&options);
        captive_options=&options;       /* for parsing by 'CAPTIVE_POPT_INCLUDE' */