Bug 15069 - vfs_gpfs with vfs_shadowcopy2 fail to restore file if original file had been deleted
Summary: vfs_gpfs with vfs_shadowcopy2 fail to restore file if original file had been ...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-17 15:10 UTC by Ralph Böhme
Modified: 2022-07-11 14:18 UTC (History)
3 users (show)

See Also:


Attachments
Patch for 4.15 and 4.16 cherry-picked from master (24.62 KB, patch)
2022-06-07 12:39 UTC, Ralph Böhme
cs: review+
jra: review+
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2022-05-17 15:10:27 UTC
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.

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

Have patchset, need bugnumber.
Comment 1 Ralph Böhme 2022-05-17 15:11:54 UTC
Fwiw, the failure in the log looks like this:

[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
Comment 2 Samba QA Contact 2022-06-03 21:54:11 UTC
This bug was referenced in samba master:

a0f7ced610013cad145ff14cedcfbb5388d1ea4f
ad06d806831c80a1169468d18b3e59b239a5ba77
5f4625a2859bf622ea2034e5bbf63f9959e58b78
c26efe0c23b426c4a1e7073b040da85df6f1ea61
3764be70319d8e953a6205649fecaed06c93dbc8
ac458648aa3f557b7f137f7efa88806f7cb0da71
1b2c70f4d16e48998c9c8bc9e22ee8eb3c0ad53e
d373ff3c01c2c50cd539b78494c0673974a0f046
a0dc4c9026519c949070dc001e7addad7c7d35ce
9172c5ff6a419e4daef451564650d4a3ce96bfae
8ae672f955bf07bb97f38b7d2f965f14e8315e9e
3bd753983c8dac33b483affa859984b7e3350d65
Comment 3 Ralph Böhme 2022-06-07 12:39:33 UTC
Created attachment 17321 [details]
Patch for 4.15 and 4.16 cherry-picked from master
Comment 4 Jeremy Allison 2022-06-07 18:29:10 UTC
Re-assigning to Jule for inclusion in 4.16.next, 4.15.next.
Comment 5 Jule Anger 2022-06-09 08:51:44 UTC
Pushed to autobuild-v4-{16,15}-test.
Comment 6 Samba QA Contact 2022-06-09 09:54:04 UTC
This bug was referenced in samba v4-15-test:

d8ad3e216e8e87a74081b89c5579d8d9d8ffdf6c
ae7e33885d79f862b9e29ee3cae0ef6e921d5db3
7ae1fdcbb2f44210f1be3dabd7afc07b9b989b64
59154a47398d5620071853aefc1cc425ac124715
06e554b22e2abfb533a8c51c4315553d4b63f5cc
85ea14d57e51c513009142d2c597f278fa2b8c73
6510b35db19bc17891191c6984e35ec5c4d59c1d
4d21f10b32d009e66e318837ebf47294dc324681
3b2cdf5dcdf26f3c64bbb4814ab19442da78d352
e387fb3202f55db86209fe4d53c71497256f83ea
948e6556979d033bab07652d1511a3a40fdb5824
a9e405097041e962ceecaacf2f4dd0340fbc7ca0
Comment 7 Samba QA Contact 2022-06-09 10:04:11 UTC
This bug was referenced in samba v4-16-test:

ea39a8894a2054b34fdc568973e575c00d8056c8
2a50ba5ae191081c6341b49ef31391cd8759277b
f752c3897403af189ddea581eb27ad0783deb73c
d9222188190db6f72349bbc35b89b85b1150864c
a039780c01cb505958ab10a08eb6fbed9493c3ed
bce1de5580ffd07287741543c62aa13c68646ffb
069354e74800d4d7ea2ca045e747369e107b920a
1d4f8f3e472608531ae61ba6af50fd73b3ff0cef
bdb2714671f5ee168c07d9ab3c549fd7532a5a45
72ef38a9747b576c6640e9b43f7b70e37f5839cb
b8cc300d226fe6a04ce26d6f91fcd484e4f0403a
c3ce1fec590d95a2d848bce52b059784eeda430a
Comment 8 Jule Anger 2022-06-09 10:08:17 UTC
Closing out bug report.

Thanks!
Comment 9 Samba QA Contact 2022-06-13 06:57:06 UTC
This bug was referenced in samba v4-16-stable (Release samba-4.16.2):

ea39a8894a2054b34fdc568973e575c00d8056c8
2a50ba5ae191081c6341b49ef31391cd8759277b
f752c3897403af189ddea581eb27ad0783deb73c
d9222188190db6f72349bbc35b89b85b1150864c
a039780c01cb505958ab10a08eb6fbed9493c3ed
bce1de5580ffd07287741543c62aa13c68646ffb
069354e74800d4d7ea2ca045e747369e107b920a
1d4f8f3e472608531ae61ba6af50fd73b3ff0cef
bdb2714671f5ee168c07d9ab3c549fd7532a5a45
72ef38a9747b576c6640e9b43f7b70e37f5839cb
b8cc300d226fe6a04ce26d6f91fcd484e4f0403a
c3ce1fec590d95a2d848bce52b059784eeda430a
Comment 10 Samba QA Contact 2022-06-28 06:51:52 UTC
This bug was referenced in samba v4-15-stable (Release samba-4.15.8):

d8ad3e216e8e87a74081b89c5579d8d9d8ffdf6c
ae7e33885d79f862b9e29ee3cae0ef6e921d5db3
7ae1fdcbb2f44210f1be3dabd7afc07b9b989b64
59154a47398d5620071853aefc1cc425ac124715
06e554b22e2abfb533a8c51c4315553d4b63f5cc
85ea14d57e51c513009142d2c597f278fa2b8c73
6510b35db19bc17891191c6984e35ec5c4d59c1d
4d21f10b32d009e66e318837ebf47294dc324681
3b2cdf5dcdf26f3c64bbb4814ab19442da78d352
e387fb3202f55db86209fe4d53c71497256f83ea
948e6556979d033bab07652d1511a3a40fdb5824
a9e405097041e962ceecaacf2f4dd0340fbc7ca0