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
This commit is contained in:
Andrew Jones
2004-11-23 13:52:17 +00:00
parent f675d424f4
commit 895a7d2f48
2 changed files with 10 additions and 23 deletions
+3 -3
View File
@@ -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
#-------------------------------------------------------
+7 -20
View File
@@ -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