[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Thu Jan 28 09:17:01 UTC 2021
The branch, master has been updated
via 9f08ddf663d vfs: update status of SMB_VFS_UNLINKAT()
via ba2e691fafc s3/libadouble: use real dirfsp in ad_convert_delete_adfile()
via 00ec67eb0ca s3/libadouble: remove dirfsp arg from ad_convert_delete_adfile()
via d2acd9629eb s3/libadouble: remove dirfsp arg from ad_convert()
via 0f3db9b6b5c smbd: use real dirfsp for SMB_VFS_UNLINKAT() in py_smbd_unlink()
via e5262e2804b smbd: use real dirfsp for SMB_VFS_UNLINKAT() in remove_msdfs_link()
via b3375098ac4 vfs: update status of SMB_VFS_CREATE_DFS_PATHAT()
via 1c60b516a1d smbd: use real dirfsp for SMB_VFS_CREATE_DFS_PATHAT() in create_msdfs_link()
via f6f4baf9194 smbd: use real dirfsp for SMB_VFS_UNLINKAT() in create_msdfs_link()
via 5f4592d1845 smbd: use real dirfsp with SMB_VFS_UNLINKAT() in rmdir_internals()
via 065f39a3d04 smbd: reduce indentation in rmdir_internals()
via 60ddee64f6e smbd: simplify rmdir_internals()
via d579394db38 smbd: README.Coding fixes in rmdir_internals()
via a1ca5740aa6 smbd: use real dirfsp for SMB_VFS_UNLINKAT() in recursive_rmdir()
via 21859695fc5 smbd: add dir_hnd_fetch_fsp()
via 640683990e8 smbd: add some space in recursive_rmdir()
via 007a352c7bf smbd: simplify recursive_rmdir()
via 0831369aef6 smbd: use real dirfsp and atname when deleting file in close_remove_share_mode()
via 2995e0d57c6 pysmbd: use parent_pathref() in py_smbd_mkdir()
via 02dd66bf4b5 smbd: use parent_pathref() in smb_set_file_unix_link()
via 65c90e62318 smbd: use parent_pathref() in smb_unix_mknod()
via 9b8b62a8406 smbd: use parent_pathref() in mkdir_internal()
via 6085f6c856e smbd: add parent_pathref()
via dd42681fe9d s4/torture: move deletion out of close loop in torture_smb2_maxfid()
via de85bccef2f vfs_fruit: support real dirfsps in fruit_unlinkat()
via 951fefeca83 vfs_fruit: support real dirfsps in fruit_unlink_rsrc_adouble()
via c231d886559 vfs_fruit: support real dirfsps in fruit_unlink_rsrc_stream()
via cb90a8dc794 vfs_fruit: use SMB_VFS_FREMOVEXATTR() in fruit_unlink_meta_netatalk()
via 8e155cbe4a4 vfs_acl_common: support real dirfsps in acl_common_remove_object()
via 5abc1e7af65 vfs_xattr_tdb: support real dirfsps in xattr_tdb_unlinkat()
via 39f432ac5d5 vfs_virusfilter: support real dirfsps in virusfilter_vfs_unlinkat()
via 2d31aef9370 vfs_unityed_media: support real dirfsps in um_unlinkat()
via f81bec1b7f3 vfs_time_audit: support real dirfsps in smb_time_audit_unlinkat()
via 7bc983f5d5f vfs_fruit: use synthetic_pathref() in delete_invalid_meta_stream()
via ffd6bcdf37c vfs_fruit: fix use after free in delete_invalid_meta_stream()
via 274ed8c012c vfs_streams_xattr: use pathref in streams_xattr_unlink_internal()
via f1607cda38e smbd: use synthetic_pathref() in delete_all_streams()
via bc1070d2410 printing: use synthetic_pathref() in driver_unlink_internals()
via 1032bf08dd3 vfs_fruit: use synthetic_pathref() in readdir_attr_meta_finderi_stream()
via d9f95b8cefe smbd: add synthetic_pathref()
via da8d14097b3 vfs_streams_depot: support real dirfsps in streams_depot_unlinkat()
via 070778011e7 vfs_streams_depot: support real dirfsps in streams_depot_rmdir_internal()
via d5ca1246dcb vfs_streams_depot: support real dirfsps in streams_depot_unlink_internal()
via e3e1170dcd4 vfs_streams_depot: remove indentation
via 65b0a017462 vfs_recycle: support real dirfsps in recycle_unlinkat()
via 469ff4ad0e6 vfs_posix_eadb: support real dirfsps in posix_eadb_unlinkat()
via 304e7955f1c vfs_posix_eadb: support real dirfsps in posix_eadb_rmdir_internal()
via f7a3eb36f14 vfs_posix_eadb: support real dirfsps in posix_eadb_unlink_internal()
via 0e8137480e9 vfs_media_harmony: support real dirfsps in mh_unlinkat()
via 613ca5a7eee vfs_glusterfs: support real dirfsps in vfs_gluster_unlinkat()
via 1e5c760e82e vfs_full_audit: support real dirfsps in smb_full_audit_unlinkat()
via f82e89c26ed vfs_extd_audit.c: support real dirfsps in audit_unlinkat()
via 2a51ed753ed vfs_default: support real dirfsps in vfswrap_unlinkat()
via fa058d166e0 vfs_ceph: support real dirfsps in cephwrap_unlinkat()
via a1c9782d23d vfs_catia: support real dirfsps in catia_unlinkat()
via 85878f71d80 vfs_catia: forward pathref fsp in catia_unlinkat()
via b6e6594ce48 vfs_cap: support real dirfsps in cap_unlinkat()
via 9838dd21a1b vfs_audit: support real dirfsps in audit_unlinkat()
via c454697eb30 vfs: make fsp arg of vfs_[memctx|fetch]_fsp_extension const
from b324626a3c3 VFS: unityed_media: Fixup um_symlinkat() to correctly use the dirfsp path.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9f08ddf663d49c62104d2185257159a39d117616
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 14:56:46 2021 +0100
vfs: update status of SMB_VFS_UNLINKAT()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Thu Jan 28 09:16:30 UTC 2021 on sn-devel-184
commit ba2e691fafcf18240da4f37e75c7fd531dd91a84
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 17:12:33 2021 +0100
s3/libadouble: use real dirfsp in ad_convert_delete_adfile()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 00ec67eb0ca400ea447dbb8dff8a003744cbd53e
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 17:06:26 2021 +0100
s3/libadouble: remove dirfsp arg from ad_convert_delete_adfile()
Going to open a dirfsp in the function itself in a later commit.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit d2acd9629eb4c28577e4ba9a4c47bb635e99bea1
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 17:03:30 2021 +0100
s3/libadouble: remove dirfsp arg from ad_convert()
ad_convert() doesn't really need the dirfsp in most places. Only
ad_convert_delete_adfile() would use it, so instead open a dirfsp internally for
this function in a later commit.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 0f3db9b6b5cb86039f51b110104f6fe9f41ad874
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 14:54:18 2021 +0100
smbd: use real dirfsp for SMB_VFS_UNLINKAT() in py_smbd_unlink()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit e5262e2804b6cef2fc2560fff84a1b07f8507e03
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 14:51:33 2021 +0100
smbd: use real dirfsp for SMB_VFS_UNLINKAT() in remove_msdfs_link()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit b3375098ac480410943cf6854161cd7f27c4ee72
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 14:52:31 2021 +0100
vfs: update status of SMB_VFS_CREATE_DFS_PATHAT()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1c60b516a1dbee862226ff9ce6da482d44234f70
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 14:49:01 2021 +0100
smbd: use real dirfsp for SMB_VFS_CREATE_DFS_PATHAT() in create_msdfs_link()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f6f4baf919424cd7ed05915eebf0ea2e6f989a0a
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 14:47:13 2021 +0100
smbd: use real dirfsp for SMB_VFS_UNLINKAT() in create_msdfs_link()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 5f4592d1845ea208a1e49094432e32a97c94d6f3
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 14:40:36 2021 +0100
smbd: use real dirfsp with SMB_VFS_UNLINKAT() in rmdir_internals()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 065f39a3d046f2f11e536608bc02c3b81af31a43
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 13:23:00 2021 +0100
smbd: reduce indentation in rmdir_internals()
No change in behaviour. Best viewed with
$ git show -w
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 60ddee64f6e6c178766325591e80d63a673ad111
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 13:14:28 2021 +0100
smbd: simplify rmdir_internals()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit d579394db38e3d21147df30d381f84fcc0fe8fa9
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 13:10:54 2021 +0100
smbd: README.Coding fixes in rmdir_internals()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit a1ca5740aa68ee390dc912c5309599bb878de72a
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 12:49:56 2021 +0100
smbd: use real dirfsp for SMB_VFS_UNLINKAT() in recursive_rmdir()
Also use synthetic_pathref() to ensure atname->fsp has a valid pathref as some
backends may make use of it.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 21859695fc5c9d7495e4549607e5f250b96e6862
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 12:46:04 2021 +0100
smbd: add dir_hnd_fetch_fsp()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 640683990e88388c39709cfc78c8f9078353d061
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 12:01:56 2021 +0100
smbd: add some space in recursive_rmdir()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 007a352c7bf2f02d9b778606da470abff2972535
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 12:00:56 2021 +0100
smbd: simplify recursive_rmdir()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 0831369aef64fc9410c65876a974f703618cf93c
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 16:45:47 2021 +0100
smbd: use real dirfsp and atname when deleting file in close_remove_share_mode()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 2995e0d57c6ad4d84232e0bbb66d3de2bee6c379
Author: Ralph Boehme <slow at samba.org>
Date: Mon Jan 25 15:51:05 2021 +0100
pysmbd: use parent_pathref() in py_smbd_mkdir()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 02dd66bf4b5be4fbe413c08827dc64168a2f882b
Author: Ralph Boehme <slow at samba.org>
Date: Mon Jan 25 15:48:59 2021 +0100
smbd: use parent_pathref() in smb_set_file_unix_link()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 65c90e623181be25b18e2c54032fc001f4dd7097
Author: Ralph Boehme <slow at samba.org>
Date: Mon Jan 25 15:46:04 2021 +0100
smbd: use parent_pathref() in smb_unix_mknod()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 9b8b62a84069d0daf2975b844bf18523a0b0510b
Author: Ralph Boehme <slow at samba.org>
Date: Mon Jan 25 15:43:31 2021 +0100
smbd: use parent_pathref() in mkdir_internal()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 6085f6c856e5da0bb703580d878e2302e360a902
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 17:05:17 2021 +0100
smbd: add parent_pathref()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit dd42681fe9db0d5d293c0a8f981f2992c6350012
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 22 07:57:31 2021 +0100
s4/torture: move deletion out of close loop in torture_smb2_maxfid()
A subsequent commit is changing the delete-on-close code in the fileserver to
open a handle on the parent directory of the file that is to be deleted.
If we've consumed all available handles, that open would fail causing a test
failure. As it's not really needed for the test semantics, don't set
delete-on-close when closing the handles, instead let the subsequent
smb2_deltree() do the cleanup.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit de85bccef2f70aa20a0e6781c8f7a8a3ff0be2ca
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 10:42:06 2021 +0100
vfs_fruit: support real dirfsps in fruit_unlinkat()
Now that all callees are updated, we can remove the assert.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 951fefeca83926e415a46b8a7f3a1c8d0be92ab6
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 10:41:41 2021 +0100
vfs_fruit: support real dirfsps in fruit_unlink_rsrc_adouble()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit c231d8865598c430b9b526c932180b189976c1fb
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 10:41:19 2021 +0100
vfs_fruit: support real dirfsps in fruit_unlink_rsrc_stream()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit cb90a8dc794357a7bb7b72d6efb743e9afc18bb4
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 10:27:22 2021 +0100
vfs_fruit: use SMB_VFS_FREMOVEXATTR() in fruit_unlink_meta_netatalk()
Use the pathref fsp from the caller.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 8e155cbe4a438c28ca5d43531e90c72b2fa0e7a0
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 16:08:58 2021 +0100
vfs_acl_common: support real dirfsps in acl_common_remove_object()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 5abc1e7af653c44db70bf0f038944f617d85a2a1
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:22:52 2021 +0100
vfs_xattr_tdb: support real dirfsps in xattr_tdb_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 39f432ac5d5d672a7cc5bc8097b00ae92c9bbe61
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:22:16 2021 +0100
vfs_virusfilter: support real dirfsps in virusfilter_vfs_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 2d31aef93701210852b82412338b19f81d56bcba
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:20:15 2021 +0100
vfs_unityed_media: support real dirfsps in um_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f81bec1b7f32e267302e84ead5a1340d3aafb95a
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:19:59 2021 +0100
vfs_time_audit: support real dirfsps in smb_time_audit_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 7bc983f5d5f11b62519ae023561eefe17f01105e
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 14:37:53 2021 +0100
vfs_fruit: use synthetic_pathref() in delete_invalid_meta_stream()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ffd6bcdf37c2965a0405d4826dab29c9ca88ffc2
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 14:36:59 2021 +0100
vfs_fruit: fix use after free in delete_invalid_meta_stream()
sname is used in the DBG_ERR message.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 274ed8c012ccbcd67068d4cb4e144765f840c0d2
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:19:31 2021 +0100
vfs_streams_xattr: use pathref in streams_xattr_unlink_internal()
All callers now pass an smb_fname that has a valid pathref fsp.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f1607cda38eb9b57567912ee595d5bd6ca8902a7
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:27:48 2021 +0100
smbd: use synthetic_pathref() in delete_all_streams()
This ensures backends can use the pathref fsp as needed.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit bc1070d241031474a9eda7f34031527e5b9b5920
Author: Ralph Boehme <slow at samba.org>
Date: Mon Jan 25 16:11:37 2021 +0100
printing: use synthetic_pathref() in driver_unlink_internals()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1032bf08dd32ddd2c8f7554f50374f22f4a36f99
Author: Ralph Boehme <slow at samba.org>
Date: Mon Jan 25 16:10:12 2021 +0100
vfs_fruit: use synthetic_pathref() in readdir_attr_meta_finderi_stream()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit d9f95b8cefe2d1c8020592434481025aa1045e2f
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 15:04:57 2021 +0100
smbd: add synthetic_pathref()
Similar to synthetic_smb_fname(), but also opens a pathref fsp.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit da8d14097b37942e271be54d0a29b5ab9c006296
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 16:07:25 2021 +0100
vfs_streams_depot: support real dirfsps in streams_depot_unlinkat()
Now that our callees support real dirfsps, remove the assert.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 070778011e733cc712f83bd74c8c23e72df9256e
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 16:07:03 2021 +0100
vfs_streams_depot: support real dirfsps in streams_depot_rmdir_internal()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit d5ca1246dcb5b2457a1b95ca861f9eec711f2f19
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 16:06:21 2021 +0100
vfs_streams_depot: support real dirfsps in streams_depot_unlink_internal()
Also remove the smb_fname_base variable, just use full_fname. If
is_named_stream(full_fname)) returns false, full_fname->stream_name will be
NULL.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit e3e1170dcd426e2fe9ace434ed56d71d24993121
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jan 21 16:29:46 2021 +0100
vfs_streams_depot: remove indentation
Makes the code easier to read.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 65b0a0174621f7a4de372bb0c273ff1a817d5539
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:16:07 2021 +0100
vfs_recycle: support real dirfsps in recycle_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 469ff4ad0e6b597d20bf894d9c1014589ec86f79
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:15:41 2021 +0100
vfs_posix_eadb: support real dirfsps in posix_eadb_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 304e7955f1cfb2058b5bf0af6d5c083f669b3c66
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:15:25 2021 +0100
vfs_posix_eadb: support real dirfsps in posix_eadb_rmdir_internal()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f7a3eb36f14094169a9283b9706a8a8103de9b5f
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:11:10 2021 +0100
vfs_posix_eadb: support real dirfsps in posix_eadb_unlink_internal()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 0e8137480e92ae45a6d2dcba98933df480bbef91
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:02:54 2021 +0100
vfs_media_harmony: support real dirfsps in mh_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 613ca5a7eee53256b81b3dee243ad205693cae47
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:02:28 2021 +0100
vfs_glusterfs: support real dirfsps in vfs_gluster_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1e5c760e82ecf54ce8c93659cedc82634f1c0542
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:02:03 2021 +0100
vfs_full_audit: support real dirfsps in smb_full_audit_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f82e89c26edfa625bad600c66186215551f6dd3a
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:01:23 2021 +0100
vfs_extd_audit.c: support real dirfsps in audit_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 2a51ed753edf868a967c7bfad1bd9f44bbf98fb0
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:01:00 2021 +0100
vfs_default: support real dirfsps in vfswrap_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit fa058d166e006d02327add731d34567fa813d91e
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:00:43 2021 +0100
vfs_ceph: support real dirfsps in cephwrap_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit a1c9782d23d9aa5a76604b0af4ddd82ad805ba20
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 15:00:20 2021 +0100
vfs_catia: support real dirfsps in catia_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 85878f71d808d57812a44161d38245b8b6054762
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 14:59:36 2021 +0100
vfs_catia: forward pathref fsp in catia_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit b6e6594ce48b0aba29c68689040babcfb5edaded
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 14:57:39 2021 +0100
vfs_cap: support real dirfsps in cap_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 9838dd21a1b1458ebce8245e374b2732c49357bb
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 14:56:50 2021 +0100
vfs_audit: support real dirfsps in audit_unlinkat()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit c454697eb30ce0bd2e4b835102673d7ed76f78bf
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jan 20 14:47:19 2021 +0100
vfs: make fsp arg of vfs_[memctx|fetch]_fsp_extension const
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/include/vfs.h | 5 +-
source3/lib/adouble.c | 33 ++-
source3/lib/adouble.h | 1 -
source3/modules/The_New_VFS.org | 4 +-
source3/modules/The_New_VFS.txt | 4 +-
source3/modules/vfs_acl_common.c | 32 ++-
source3/modules/vfs_audit.c | 11 +-
source3/modules/vfs_cap.c | 16 +-
source3/modules/vfs_catia.c | 16 +-
source3/modules/vfs_ceph.c | 16 +-
source3/modules/vfs_default.c | 2 -
source3/modules/vfs_extd_audit.c | 13 +-
source3/modules/vfs_fruit.c | 88 ++++----
source3/modules/vfs_full_audit.c | 11 +-
source3/modules/vfs_glusterfs.c | 16 +-
source3/modules/vfs_media_harmony.c | 13 +-
source3/modules/vfs_posix_eadb.c | 36 +++-
source3/modules/vfs_recycle.c | 42 ++--
source3/modules/vfs_streams_depot.c | 109 +++++-----
source3/modules/vfs_streams_xattr.c | 5 +-
source3/modules/vfs_time_audit.c | 11 +-
source3/modules/vfs_unityed_media.c | 13 +-
source3/modules/vfs_virusfilter.c | 13 +-
source3/modules/vfs_xattr_tdb.c | 19 +-
source3/printing/nt_printing.c | 29 +--
source3/smbd/close.c | 404 ++++++++++++++++++++++--------------
source3/smbd/dir.c | 5 +
source3/smbd/files.c | 116 +++++++++++
source3/smbd/msdfs.c | 38 +++-
source3/smbd/open.c | 21 +-
source3/smbd/proto.h | 17 ++
source3/smbd/pysmbd.c | 38 ++--
source3/smbd/trans2.c | 42 +---
source3/smbd/vfs.c | 6 +-
source4/torture/smb2/maxfid.c | 10 -
35 files changed, 814 insertions(+), 441 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 49726618c5c..eb005bdc86a 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -1823,8 +1823,9 @@ void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle,
void (*destroy_fn)(void *p_data));
void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
void vfs_remove_all_fsp_extensions(struct files_struct *fsp);
-void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
-void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
+void *vfs_memctx_fsp_extension(vfs_handle_struct *handle,
+ const struct files_struct *fsp);
+void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, const struct files_struct *fsp);
void smb_vfs_assert_all_fns(const struct vfs_fn_pointers* fns,
const char *module);
diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c
index e869965876d..3be6f353bd8 100644
--- a/source3/lib/adouble.c
+++ b/source3/lib/adouble.c
@@ -1371,11 +1371,13 @@ static bool ad_convert_blank_rfork(vfs_handle_struct *handle,
static bool ad_convert_delete_adfile(vfs_handle_struct *handle,
struct adouble *ad,
- struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
uint32_t flags)
{
+ struct smb_filename *parent_fname = NULL;
+ struct smb_filename *at_fname = NULL;
struct smb_filename *ad_name = NULL;
+ NTSTATUS status;
int rc;
if (ad_getentrylen(ad, ADEID_RFORK) > 0) {
@@ -1391,19 +1393,32 @@ static bool ad_convert_delete_adfile(vfs_handle_struct *handle,
return false;
}
+ status = parent_pathref(talloc_tos(),
+ handle->conn->cwd_fsp,
+ ad_name,
+ &parent_fname,
+ &at_fname);
+ TALLOC_FREE(ad_name);
+ if (!NT_STATUS_IS_OK(status)) {
+ return false;
+ }
+
rc = SMB_VFS_NEXT_UNLINKAT(handle,
- dirfsp,
- ad_name,
+ parent_fname->fsp,
+ at_fname,
0);
if (rc != 0) {
- DBG_ERR("Unlinking [%s] failed: %s\n",
- smb_fname_str_dbg(ad_name), strerror(errno));
- TALLOC_FREE(ad_name);
+ DBG_ERR("Unlinking [%s/%s] failed: %s\n",
+ smb_fname_str_dbg(parent_fname),
+ smb_fname_str_dbg(at_fname), strerror(errno));
+ TALLOC_FREE(parent_fname);
return false;
}
- DBG_WARNING("Unlinked [%s] after conversion\n", smb_fname_str_dbg(ad_name));
- TALLOC_FREE(ad_name);
+ DBG_WARNING("Unlinked [%s/%s] after conversion\n",
+ smb_fname_str_dbg(parent_fname),
+ smb_fname_str_dbg(at_fname));
+ TALLOC_FREE(parent_fname);
return true;
}
@@ -1418,7 +1433,6 @@ static bool ad_convert_delete_adfile(vfs_handle_struct *handle,
* otherwise
**/
int ad_convert(struct vfs_handle_struct *handle,
- struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
const char *catia_mappings,
uint32_t flags)
@@ -1468,7 +1482,6 @@ int ad_convert(struct vfs_handle_struct *handle,
ok = ad_convert_delete_adfile(handle,
ad,
- dirfsp,
smb_fname,
flags);
if (!ok) {
diff --git a/source3/lib/adouble.h b/source3/lib/adouble.h
index a5761281670..040568a44b6 100644
--- a/source3/lib/adouble.h
+++ b/source3/lib/adouble.h
@@ -154,7 +154,6 @@ char *ad_get_entry(const struct adouble *ad, int eid);
int ad_getdate(const struct adouble *ad, unsigned int dateoff, uint32_t *date);
int ad_setdate(struct adouble *ad, unsigned int dateoff, uint32_t date);
int ad_convert(struct vfs_handle_struct *handle,
- struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
const char *catia_mappings,
uint32_t flags);
diff --git a/source3/modules/The_New_VFS.org b/source3/modules/The_New_VFS.org
index f5dcec8db62..ca8ce7dc747 100644
--- a/source3/modules/The_New_VFS.org
+++ b/source3/modules/The_New_VFS.org
@@ -208,7 +208,7 @@ whenever VFS access is done in a piecemeal fashion.
| SMB_VFS_CLOSEDIR() | [[fsp][fsp]] | - |
| SMB_VFS_CONNECT() | [[Disk][Disk]] | - |
| SMB_VFS_CONNECTPATH() | [[P2px][P2px]] | - |
-| SMB_VFS_CREATE_DFS_PATHAT() | [[NsC][NsC]] | Todo |
+| SMB_VFS_CREATE_DFS_PATHAT() | [[NsC][NsC]] | - |
| SMB_VFS_CREATE_FILE() | [[NsC][NsC]] | - |
| SMB_VFS_DISCONNECT() | [[Disk][Disk]] | - |
| SMB_VFS_DISK_FREE() | [[Disk][Disk]] | - |
@@ -301,7 +301,7 @@ whenever VFS access is done in a piecemeal fashion.
| SMB_VFS_SYS_ACL_SET_FD() | [[xpathref][xpathref]] | - |
| SMB_VFS_TELLDIR() | [[fsp][fsp]] | - |
| SMB_VFS_TRANSLATE_NAME() | [[P2px][P2px]] | - |
-| SMB_VFS_UNLINKAT() | [[NsC][NsC]] | Todo |
+| SMB_VFS_UNLINKAT() | [[NsC][NsC]] | - |
|-----------------------------------+----------+--------|
*** New VFS Functions
diff --git a/source3/modules/The_New_VFS.txt b/source3/modules/The_New_VFS.txt
index a42985b5eaf..93b6d764779 100644
--- a/source3/modules/The_New_VFS.txt
+++ b/source3/modules/The_New_VFS.txt
@@ -276,7 +276,7 @@ Table of Contents
SMB_VFS_CLOSEDIR() [fsp] -
SMB_VFS_CONNECT() [Disk] -
SMB_VFS_CONNECTPATH() [P2px] -
- SMB_VFS_CREATE_DFS_PATHAT() [NsC] Todo
+ SMB_VFS_CREATE_DFS_PATHAT() [NsC] -
SMB_VFS_CREATE_FILE() [NsC] -
SMB_VFS_DISCONNECT() [Disk] -
SMB_VFS_DISK_FREE() [Disk] -
@@ -369,7 +369,7 @@ Table of Contents
SMB_VFS_SYS_ACL_SET_FD() [xpathref] -
SMB_VFS_TELLDIR() [fsp] -
SMB_VFS_TRANSLATE_NAME() [P2px] -
- SMB_VFS_UNLINKAT() [NsC] Todo
+ SMB_VFS_UNLINKAT() [NsC] -
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 5aeb159b686..db6f40d3adf 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -1187,6 +1187,7 @@ done:
}
static int acl_common_remove_object(vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
bool is_directory)
{
@@ -1194,6 +1195,7 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
struct file_id id;
files_struct *fsp = NULL;
int ret = 0;
+ struct smb_filename *full_fname = NULL;
struct smb_filename *local_fname = NULL;
struct smb_filename *parent_dir_fname = NULL;
int saved_errno = 0;
@@ -1206,8 +1208,15 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
goto out;
}
+ full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+ dirfsp,
+ smb_fname);
+ if (full_fname == NULL) {
+ goto out;
+ }
+
ok = parent_smb_fname(talloc_tos(),
- smb_fname,
+ full_fname,
&parent_dir_fname,
&local_fname);
if (!ok) {
@@ -1215,9 +1224,8 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
goto out;
}
- DBG_DEBUG("removing %s %s/%s\n", is_directory ? "directory" : "file",
- smb_fname_str_dbg(parent_dir_fname),
- smb_fname_str_dbg(local_fname));
+ DBG_DEBUG("removing %s %s\n", is_directory ? "directory" : "file",
+ smb_fname_str_dbg(full_fname));
/* cd into the parent dir to pin it. */
ret = vfs_ChDir(conn, parent_dir_fname);
@@ -1248,10 +1256,9 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
}
if (!fsp) {
- DBG_DEBUG("%s %s/%s not an open file\n",
+ DBG_DEBUG("%s %s not an open file\n",
is_directory ? "directory" : "file",
- smb_fname_str_dbg(parent_dir_fname),
- smb_fname_str_dbg(local_fname));
+ smb_fname_str_dbg(full_fname));
saved_errno = EACCES;
goto out;
}
@@ -1259,13 +1266,13 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
become_root();
if (is_directory) {
ret = SMB_VFS_NEXT_UNLINKAT(handle,
- conn->cwd_fsp,
- local_fname,
+ dirfsp,
+ smb_fname,
AT_REMOVEDIR);
} else {
ret = SMB_VFS_NEXT_UNLINKAT(handle,
- conn->cwd_fsp,
- local_fname,
+ dirfsp,
+ smb_fname,
0);
}
unbecome_root();
@@ -1277,6 +1284,7 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
out:
TALLOC_FREE(parent_dir_fname);
+ TALLOC_FREE(full_fname);
if (saved_dir_fname) {
vfs_ChDir(conn, saved_dir_fname);
@@ -1306,6 +1314,7 @@ int rmdir_acl_common(struct vfs_handle_struct *handle,
/* Failed due to access denied,
see if we need to root override. */
return acl_common_remove_object(handle,
+ dirfsp,
smb_fname,
true);
}
@@ -1340,6 +1349,7 @@ int unlink_acl_common(struct vfs_handle_struct *handle,
return -1;
}
return acl_common_remove_object(handle,
+ dirfsp,
smb_fname,
false);
}
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index f62591f7be0..72d982b88ae 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -270,18 +270,27 @@ static int audit_unlinkat(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
int flags)
{
+ struct smb_filename *full_fname = NULL;
int result;
+ full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+ dirfsp,
+ smb_fname);
+ if (full_fname == NULL) {
+ return -1;
+ }
+
result = SMB_VFS_NEXT_UNLINKAT(handle,
dirfsp,
smb_fname,
flags);
syslog(audit_syslog_priority(handle), "unlinkat %s %s%s\n",
- smb_fname->base_name,
+ full_fname->base_name,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
+ TALLOC_FREE(full_fname);
return result;
}
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 597e0293fd3..c2df73a7fe4 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -295,18 +295,28 @@ static int cap_unlinkat(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
int flags)
{
+ struct smb_filename *full_fname = NULL;
struct smb_filename *smb_fname_tmp = NULL;
char *cappath = NULL;
int ret;
- cappath = capencode(talloc_tos(), smb_fname->base_name);
+ full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+ dirfsp,
+ smb_fname);
+ if (full_fname == NULL) {
+ return -1;
+ }
+
+ cappath = capencode(talloc_tos(), full_fname->base_name);
if (!cappath) {
+ TALLOC_FREE(full_fname);
errno = ENOMEM;
return -1;
}
/* Setup temporary smb_filename structs. */
- smb_fname_tmp = cp_smb_filename(talloc_tos(), smb_fname);
+ smb_fname_tmp = cp_smb_filename(talloc_tos(), full_fname);
+ TALLOC_FREE(full_fname);
if (smb_fname_tmp == NULL) {
errno = ENOMEM;
return -1;
@@ -315,7 +325,7 @@ static int cap_unlinkat(vfs_handle_struct *handle,
smb_fname_tmp->base_name = cappath;
ret = SMB_VFS_NEXT_UNLINKAT(handle,
- dirfsp,
+ dirfsp->conn->cwd_fsp,
smb_fname_tmp,
flags);
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 355e1127998..d7e53e4fa12 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -662,27 +662,35 @@ static int catia_unlinkat(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
int flags)
{
+ struct catia_cache *cc = NULL;
struct smb_filename *smb_fname_tmp = NULL;
char *name = NULL;
NTSTATUS status;
int ret;
+ ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, dirfsp, &cc);
+ if (ret != 0) {
+ return ret;
+ }
+
status = catia_string_replace_allocate(handle->conn,
smb_fname->base_name,
&name, vfs_translate_to_unix);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
- return -1;
+ goto out;
}
/* Setup temporary smb_filename structs. */
smb_fname_tmp = cp_smb_filename(talloc_tos(), smb_fname);
if (smb_fname_tmp == NULL) {
errno = ENOMEM;
- return -1;
+ goto out;
}
smb_fname_tmp->base_name = name;
+ smb_fname_tmp->fsp = smb_fname->fsp;
+
ret = SMB_VFS_NEXT_UNLINKAT(handle,
dirfsp,
smb_fname_tmp,
@@ -690,6 +698,8 @@ static int catia_unlinkat(vfs_handle_struct *handle,
TALLOC_FREE(smb_fname_tmp);
TALLOC_FREE(name);
+out:
+ CATIA_FETCH_FSP_POST_NEXT(&cc, dirfsp);
return ret;
}
@@ -869,6 +879,8 @@ static int catia_ntimes(vfs_handle_struct *handle,
}
smb_fname_tmp->base_name = name;
+ smb_fname_tmp->fsp = smb_fname->fsp;
+
ret = SMB_VFS_NEXT_NTIMES(handle, smb_fname_tmp, ft);
TALLOC_FREE(name);
TALLOC_FREE(smb_fname_tmp);
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index cacc725310a..a34ed8eab14 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -829,21 +829,31 @@ static int cephwrap_unlinkat(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
int flags)
{
+ struct smb_filename *full_fname = NULL;
int result = -1;
DBG_DEBUG("[CEPH] unlink(%p, %s)\n",
handle,
smb_fname_str_dbg(smb_fname));
- SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
+
if (smb_fname->stream_name) {
errno = ENOENT;
return result;
}
+
+ full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+ dirfsp,
+ smb_fname);
+ if (full_fname == NULL) {
+ return -1;
+ }
+
if (flags & AT_REMOVEDIR) {
- result = ceph_rmdir(handle->data, smb_fname->base_name);
+ result = ceph_rmdir(handle->data, full_fname->base_name);
} else {
- result = ceph_unlink(handle->data, smb_fname->base_name);
+ result = ceph_unlink(handle->data, full_fname->base_name);
}
+ TALLOC_FREE(full_fname);
DBG_DEBUG("[CEPH] unlink(...) = %d\n", result);
WRAP_RETURN(result);
}
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 8d592bbad64..84464bc3b04 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2404,8 +2404,6 @@ static int vfswrap_unlinkat(vfs_handle_struct *handle,
START_PROFILE(syscall_unlinkat);
- SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
-
if (is_named_stream(smb_fname)) {
errno = ENOENT;
goto out;
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index daf88672862..45e8f1c5b3b 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -309,8 +309,16 @@ static int audit_unlinkat(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
int flags)
{
+ struct smb_filename *full_fname = NULL;
int result;
+ full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+ dirfsp,
+ smb_fname);
+ if (full_fname == NULL) {
+ return -1;
+ }
+
result = SMB_VFS_NEXT_UNLINKAT(handle,
dirfsp,
smb_fname,
@@ -318,15 +326,16 @@ static int audit_unlinkat(vfs_handle_struct *handle,
if (lp_syslog() > 0) {
syslog(audit_syslog_priority(handle), "unlinkat %s %s%s\n",
- smb_fname->base_name,
+ full_fname->base_name,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
}
DBG_ERR("unlinkat %s %s %s\n",
- smb_fname_str_dbg(smb_fname),
+ smb_fname_str_dbg(full_fname),
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
+ TALLOC_FREE(full_fname);
return result;
}
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index f5b5f91a012..529741d2611 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -902,26 +902,17 @@ static bool readdir_attr_meta_finderi_stream(
files_struct *fsp = NULL;
ssize_t nread;
NTSTATUS status;
- int ret;
bool ok;
uint8_t buf[AFP_INFO_SIZE];
- stream_name = synthetic_smb_fname(talloc_tos(),
- smb_fname->base_name,
- AFPINFO_STREAM_NAME,
- NULL,
- smb_fname->twrp,
- smb_fname->flags);
- if (stream_name == NULL) {
- return false;
--
Samba Shared Repository
More information about the samba-cvs
mailing list