From: short <> Date: Thu, 30 Oct 2003 16:24:36 +0000 (+0000) Subject: Fixed captive-sandbox-server chroot(2) mode on SUSE9.0. X-Git-Tag: captive-1_0_2~41 X-Git-Url: http://git.jankratochvil.net/?p=captive.git;a=commitdiff_plain;h=e06ce4e02c8f8f104e82be2ba006464e38237592 Fixed captive-sandbox-server chroot(2) mode on SUSE9.0. - Great debugging support by the courtesy of Christian Kristukat. --- diff --git a/src/client/sandbox-server/main.c b/src/client/sandbox-server/main.c index 3f470bc..796fbbc 100644 --- a/src/client/sandbox-server/main.c +++ b/src/client/sandbox-server/main.c @@ -368,6 +368,14 @@ struct passwd *want_uid_passwd; want_uid_name=captive_strdup_alloca(want_uid_passwd->pw_name); } + /* Prevent: GLib-WARNING **: getpwuid_r(): failed due to unknown user id (42) + * Try to invoke GLib g_get_any_init() before possible chroot(2) below. + */ + g_get_user_name(); + g_get_real_name(); + g_get_home_dir(); + g_get_tmp_dir(); + if (fragile && !optarg_chroot) fatal("Fragile setuid/root environment but no --chroot set"); if (optarg_chroot) {