mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
generic: test enforcement of one encryption policy per tree
Add an xfstest which verifies that the filesystem forbids operations that would violate the constraint that all files in an encrypted directory tree use the same encryption policy. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
QA output created by 398
|
||||
|
||||
*** Link encrypted <= encrypted ***
|
||||
ln: failed to create hard link 'SCRATCH_MNT/edir2/efile1' => 'SCRATCH_MNT/edir1/efile1': Operation not permitted
|
||||
|
||||
*** Rename encrypted => encrypted ***
|
||||
mv: cannot move 'SCRATCH_MNT/edir1/efile1' to 'SCRATCH_MNT/edir2/efile1': Operation not permitted
|
||||
|
||||
|
||||
*** Link unencrypted <= encrypted ***
|
||||
ln: failed to create hard link 'SCRATCH_MNT/edir1/ufile' => 'SCRATCH_MNT/udir/ufile': Operation not permitted
|
||||
|
||||
*** Rename unencrypted => encrypted ***
|
||||
mv: cannot move 'SCRATCH_MNT/udir/ufile' to 'SCRATCH_MNT/edir1/ufile': Operation not permitted
|
||||
|
||||
|
||||
*** Link encrypted <= unencrypted ***
|
||||
'SCRATCH_MNT/udir/efile1' => 'SCRATCH_MNT/edir1/efile1'
|
||||
|
||||
*** Rename encrypted => unencrypted ***
|
||||
'SCRATCH_MNT/edir1/efile1' -> 'SCRATCH_MNT/udir/efile1'
|
||||
|
||||
|
||||
*** Exchange encrypted <=> encrypted ***
|
||||
Operation not permitted
|
||||
|
||||
*** Exchange unencrypted <=> encrypted ***
|
||||
Operation not permitted
|
||||
|
||||
*** Exchange encrypted <=> unencrypted ***
|
||||
Operation not permitted
|
||||
|
||||
|
||||
*** Special file tests ***
|
||||
'SCRATCH_MNT/edir1/fifo' -> 'SCRATCH_MNT/edir2/fifo'
|
||||
'SCRATCH_MNT/edir2/fifo' -> 'SCRATCH_MNT/udir/fifo'
|
||||
'SCRATCH_MNT/udir/fifo' -> 'SCRATCH_MNT/edir1/fifo'
|
||||
'SCRATCH_MNT/edir2/fifo' => 'SCRATCH_MNT/edir1/fifo'
|
||||
|
||||
|
||||
*** Exchange encrypted <=> encrypted without key ***
|
||||
Operation not permitted
|
||||
|
||||
*** Exchange encrypted <=> unencrypted without key ***
|
||||
Operation not permitted
|
||||
Reference in New Issue
Block a user