summaryrefslogtreecommitdiff
path: root/051
diff options
context:
space:
mode:
authorTim Shimmin <tes@sgi.com>2002-05-09 05:26:20 +0000
committerTim Shimmin <tes@sgi.com>2002-05-09 05:26:20 +0000
commit263901a6356717190bf9fd6ea4c358ae53437275 (patch)
tree5637d9266a68399622adc7e5121e4228d6908faa /051
parent71fc82d4bd36e5b46cdd38cfdacd63dd3514c5e4 (diff)
move some acl funcs into common.attr
Diffstat (limited to '051')
-rwxr-xr-x05138
1 files changed, 1 insertions, 37 deletions
diff --git a/051 b/051
index b0be08d4..90e0a3f6 100755
--- a/051
+++ b/051
@@ -85,8 +85,7 @@ rm -f $seq.full
_need_to_be_root
_acl_setup_ids
-
-[ ! -x /bin/chacl -a ! -x /usr/bin/chacl ] && _notrun "chacl command not found"
+_acl_requirements
[ -x $runas ] || _notrun "$runas executable not found"
# get dir
@@ -95,15 +94,6 @@ rm -rf $seq.dir1
mkdir $seq.dir1
cd $seq.dir1
-# test if acl_get syscall is operational
-# and hence the ACL config has been turned on
-touch syscalltest
-if chacl -l syscalltest 2>&1 | tee -a $here/$seq.full | grep 'Function not implemented' >/dev/null
-then
- cd $here
- _notrun "requires kernel ACL support"
-fi
-
#-------------------------------------------------------
# real QA test starts here
echo "QA output created by $seq"
@@ -353,38 +343,12 @@ XFS_ACL_MAX_ENTRIES=25
num_aces_pre=`expr $XFS_ACL_MAX_ENTRIES - 1`
num_aces_post=`expr $XFS_ACL_MAX_ENTRIES + 1`
-_create_n_aces()
-{
- n=`expr $1 - 4`
- acl='u::rwx,g::rwx,o::rwx,m::rwx' # 4 ace acl start
- while [ $n -ne 0 ]; do
- acl="$acl,u:$n:rwx"
- n=`expr $n - 1`
- done
- echo $acl
-}
-
-_filter_aces()
-{
- $AWK_PROG '
- BEGIN {
- FS=":"
- while ( getline <"/etc/passwd" > 0 ) {
- idlist[$1] = $3
- }
- }
- /^user/ { if ($2 in idlist) sub($2, idlist[$2])}
- {print}
- '
-}
-
acl1=`_create_n_aces $num_aces_pre`
acl2=`_create_n_aces $XFS_ACL_MAX_ENTRIES`
acl3=`_create_n_aces $num_aces_post`
acl4=`_create_n_aces 16` # Andreas G. libacl size for initial get
acl5=`_create_n_aces 17` # 1 over A.G. libacl initial size
-
echo "1 below xfs acl max"
chacl $acl1 largeaclfile
getfacl largeaclfile | _filter_aces