Add xfsdump support for the security extended attributes namespace.

Execute security attribute tests if $USE_ATTR_SECURE environment variable
is set to "yes" (security attribute tests disabled by default - "no").
This commit is contained in:
Mandy Kirkconnell
2004-02-26 00:31:25 +00:00
parent 0c6dfc4edd
commit 1262ba3c4a
3 changed files with 21 additions and 3 deletions
+13 -1
View File
@@ -1172,7 +1172,7 @@ _get_eas_on_path()
# sort |\
# and this is now the Linux way...
echo "User names"
getfattr --absolute-names -Rh $_path |\
getfattr --absolute-names -Rh -m user $_path |\
perl -wn -e '
if (m/^# file: (\S+)/) { $file = $1 }
elsif (m/^user\.(\w+)/) { print $file, " ",$1,"\n" }' |\
@@ -1181,6 +1181,18 @@ _get_eas_on_path()
attr -g $ea_name $file
done
if [ "$USE_ATTR_SECURE" = yes ]; then
echo "Security names"
getfattr --absolute-names -Rh -m security $_path |\
perl -wn -e '
if (m/^# file: (\S+)/) { $file = $1 }
elsif (m/^security\.(\w+)/) { print $file, " ",$1,"\n" }' |\
sort |\
while read file ea_name; do
attr -g $ea_name $file
done
fi
echo "Root names"
getfattr --absolute-names -Rh -m trusted $_path |\
perl -wn -e '