Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=ffe2c4b2206b627b53eca69b3c4744fc44994c4b

commit ffe2c4b2206b627b53eca69b3c4744fc44994c4b
Author: James Buren <[email protected]>
Date:   Thu May 19 20:05:13 2011 -0500

fw32-0.4-1-x86_64
* chdir after chroot in fw32-run

diff --git a/source/apps-extra/fw32/FrugalBuild 
b/source/apps-extra/fw32/FrugalBuild
index 7b99a83..de1df10 100644
--- a/source/apps-extra/fw32/FrugalBuild
+++ b/source/apps-extra/fw32/FrugalBuild
@@ -2,7 +2,7 @@
# Maintainer: James Buren <[email protected]>

pkgname=fw32
-pkgver=0.3
+pkgver=0.4
pkgrel=1
pkgdesc="A framework for maintaining an i686 environment on x86_64."
url="http://www.frugalware.org";
@@ -14,7 +14,7 @@ backup=('etc/fw32/pacman-g2.conf')
source=(fw32 pacman-g2.conf fw32-run.c README.Frugalware)
sha1sums=('17a8e653ec4292975f226851c2296680096ddc9f' \
'd84ca5b6d1c37993dd6514d41eb4923a057a0d27' \
-          '83e685227ac174e37f1d71d04d0540cc2fac9236' \
+          '3ac904555b20ae69b3456238787d3eb7c7146687' \
'38f15d2fe6d1665efe243187eb2c9d9fd571d12e')

build()
diff --git a/source/apps-extra/fw32/fw32-run.c 
b/source/apps-extra/fw32/fw32-run.c
index 4951945..a54a4bd 100644
--- a/source/apps-extra/fw32/fw32-run.c
+++ b/source/apps-extra/fw32/fw32-run.c
@@ -185,11 +185,14 @@ main(int argc,char **argv)

mount_home(pwd->pw_dir);

+       if(chroot(FW32_ROOT))
+               error("Failed to enter chroot.\n");
+
if(personality(PER_LINUX32))
error("Failed to enable 32 bit emulation.\n");

-       if(chroot(FW32_ROOT))
-               error("Failed to enter chroot.\n");
+       if(chdir(pwd->pw_dir))
+               error("Failed to change to home directory.\n");

if(setuid(getuid()))
error("Failed to drop root permissions.\n");
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to