Skip to content

vfs_gpfs with vfs_shadowcopy2 fail to restore file if original file had been deleted

Inside vfs_gpfs we query the file ACL via path based function gfs_getacl(fsp->fsp_name), which refers to the original file and is not translated by vfs_shadow_copy2:

[2022/05/06 11:32:55.233435,  4, pid=12962, effective(1460548, 273710), real(1460548, 0)]
   calling open_file with flags=0x0 flags2=0x800 mode=0644, access_mask = 0x80, open_access_mask = 0x80
[2022/05/06 11:32:55.233460, 10, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs]
   gpfs_get_nfs4_acl invoked for dir/subdir/file.txt
[2022/05/06 11:32:55.233495,  5, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs]
   smbd_gpfs_getacl failed with No such file or directory
[2022/05/06 11:32:55.233521,  9, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs]
   gpfs_getacl failed for dir/subdir/file.txt with No such file or directory
[2022/05/06 11:32:55.233546, 10, pid=12962, effective(1460548, 273710), real(1460548, 0)]
   smbd_check_access_rights_fsp: Could not get acl on dir/subdir/file.txt {@GMT-2022.05.04-11.58.53}: NT_STATUS_OBJECT_NAME_NOT_FOUND

We need to convert vfs_gpfs to use handle based gfs_getacl_fd(fsp).

Planning to test this at a customer site before asking for review, just putting it here for the curious reader... 😄

https://bugzilla.samba.org/show_bug.cgi?id=15069

Edited by Ralph Böhme

Merge request reports