From: Enrico Scholz Date: Thu, 27 Jan 2005 19:16:54 +0000 (+0000) Subject: fixed execution order of chroot(2) and context-creation; this caused X-Git-Tag: IPSENTINEL_VERSION_0_12~176 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8107139f08c72f5097129b525f473382c4e839e5;p=util-vserver.git fixed execution order of chroot(2) and context-creation; this caused errors on kernel 2.6 when the vserver is not running yet git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1818 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/src/rpm-fake.c b/util-vserver/src/rpm-fake.c index f6c9770..7b27923 100644 --- a/util-vserver/src/rpm-fake.c +++ b/util-vserver/src/rpm-fake.c @@ -311,10 +311,12 @@ initPwSocket() *ptr++ = resolver; *ptr++ = "-F"; *ptr++ = flag_str; *ptr++ = "-C"; *ptr++ = caps_str; - if (root) { *ptr++ = "-r"; *ptr++ = root; } + if (root) { *ptr++ = "-r"; *ptr++ = "."; } if (uid) { *ptr++ = "-u"; *ptr++ = uid; } if (gid) { *ptr++ = "-g"; *ptr++ = gid; } + if (root) Echdir(root); + if (setupContext(ctx, &xid_str)) { *ptr++ = "-s"; } else if (xid_str) { *ptr++ = "-c"; *ptr++ = xid_str; }