From 895a7d2f48e35a2b7d1c079f838f9769a6d13148 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 23 Nov 2004 13:52:17 +0000 Subject: [PATCH] Fixed double function issue with the UDF merge. Merge of xfs-cmds-melb:slinx:20266a by kenmcd. Changed _filter_aces function call to _filter_aces_notypes --- 099 | 6 +++--- common.attr | 27 +++++++-------------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/099 b/099 index 74fe486c..9af426e3 100755 --- a/099 +++ b/099 @@ -321,15 +321,15 @@ acl3=`_create_n_aces $num_aces_post` echo "1 below xfs acl max" chacl $acl1 largeaclfile -_acl_list largeaclfile | _filter_aces +_acl_list largeaclfile | _filter_aces_notypes echo "xfs acl max" chacl $acl2 largeaclfile -_acl_list largeaclfile | _filter_aces +_acl_list largeaclfile | _filter_aces_notypes echo "1 above xfs acl max" chacl $acl3 largeaclfile -_acl_list largeaclfile | _filter_aces +_acl_list largeaclfile | _filter_aces_notypes #------------------------------------------------------- diff --git a/common.attr b/common.attr index 2b333efb..31f71f2e 100644 --- a/common.attr +++ b/common.attr @@ -98,11 +98,18 @@ _filter_aces() } } /^user/ { if ($2 in idlist) sub($2, idlist[$2]); print; next} + /^u/ { if ($2 in idlist) sub($2, idlist[$2]); print; next} /^default:user/ { if ($3 in idlist) sub($3, idlist[$3]); print; next} {print} ' } +_filter_aces_notypes() +{ + tr '\[' '\012' | tr ']' '\012' | tr ',' '\012' | _filter_aces|\ + sed -e 's/u:/user:/' -e 's/g:/group:/' -e 's/o:/other:/' -e 's/m:/mask:/' +} + # test if acl code will work # _acl_requirements() @@ -124,26 +131,6 @@ _acl_requirements() fi } -# filter user ace names to user ids -# -_filter_aces() -{ - tr '\[' '\012' |\ - tr ']' '\012' |\ - tr ',' '\012' |\ - $AWK_PROG ' - BEGIN { - FS=":" - while ( getline <"/etc/passwd" > 0 ) { - idlist[$1] = $3 - } - } - /^u/ { if ($2 in idlist) sub($2, idlist[$2]); print; next} - {print} - ' |\ - sed -e 's/u:/user:/' -e 's/g:/group:/' -e 's/o:/other:/' -e 's/m:/mask:/' -} - _list_acl() { file=$1 -- 2.30.2