Updated buildscripts (v2.2.8)

Bill's LFS Login lfsbill at wlmcs.com
Mon Apr 21 10:51:36 PDT 2003


On Mon, 21 Apr 2003, Bill's LFS Login wrote:

> erik, saw your recent post and had just finished this one. So I decided
> to post it so that you also have the information I garnered. Let's post
> again with a preferred/best/combination solution (I'll try your stuff
> too) that addresses all the issues we find.
>
> <snip>

BTW, attached the patch for fail-2eperm that that I'm running.

-- 
Bill Maltby
lfsbill at wlmcs.com
-------------- next part --------------
diff -Naur orig/fail-2eperm chgd/fail-2eperm
--- orig/fail-2eperm	2003-03-08 11:39:37.000000000 -0500
+++ chgd/fail-2eperm	2003-04-21 13:14:28.000000000 -0400
@@ -20,10 +20,11 @@
 cd $tmp || framework_failure=1
 
 # Find a username with UID != 0, and a valid shell.
+pwd
 non_root_username=
 names=`grep -v '[^:]*:[^:]*:0:' /etc/passwd| sed 's/:.*//'`
 for name in $names; do
-  su -c ':' $name && { non_root_username=$name; break; }
+  /bin/su $name -c 'id' && { non_root_username=$name; break; }
 done
 test "x$non_root_username" = x && framework_failure=1
 
@@ -41,9 +42,9 @@
 
 fail=0
 
-su -c 'rm -rf a' $non_root_username 2> out && fail=1
+/bin/su $non_root_username -c '../../../../src/rm -rf a' 2> out && fail=1
 cat <<\EOF > exp
-rm: cannot remove `a/b': Operation not permitted
+../../../../src/rm: cannot remove `a/b': Operation not permitted
 EOF
 
 cmp out exp || fail=1


More information about the lfs-dev mailing list