mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
+13
-1
@@ -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 '
|
||||
|
||||
Reference in New Issue
Block a user