samba.git
4 years agos3: VFS: vfs_acl_tdb: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 17:02:16 +0000 (10:02 -0700)]
s3: VFS: vfs_acl_tdb: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_xattr: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 17:01:32 +0000 (10:01 -0700)]
s3: VFS: vfs_acl_xattr: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_posix_eadb: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 17:00:43 +0000 (10:00 -0700)]
s3: VFS: vfs_posix_eadb: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_ceph: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:59:54 +0000 (09:59 -0700)]
s3: VFS: vfs_ceph: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_glusterfs: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:59:03 +0000 (09:59 -0700)]
s3: VFS: vfs_glusterfs: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_depot: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:57:59 +0000 (09:57 -0700)]
s3: VFS: vfs_streams_depot: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_syncops: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:56:53 +0000 (09:56 -0700)]
s3: VFS: vfs_syncops: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:54:10 +0000 (09:54 -0700)]
s3: VFS: vfs_fruit: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_recycle: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:22:38 +0000 (09:22 -0700)]
s3: VFS: vfs_recycle: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_unityed_media: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:18:07 +0000 (19:18 -0700)]
s3: VFS: vfs_unityed_media: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_xattr_tdb: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:16:31 +0000 (19:16 -0700)]
s3: VFS: vfs_xattr_tdb: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_virusfilter: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:15:38 +0000 (19:15 -0700)]
s3: VFS: vfs_virusfilter: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_time_audit: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:14:22 +0000 (19:14 -0700)]
s3: VFS: vfs_time_audit: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_xattr: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:13:05 +0000 (19:13 -0700)]
s3: VFS: vfs_streams_xattr: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_snapper: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:05:27 +0000 (19:05 -0700)]
s3: VFS: vfs_snapper: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_shadow_copy2: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:04:38 +0000 (19:04 -0700)]
s3: VFS: vfs_shadow_copy2: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_media_harmony: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:04:06 +0000 (18:04 -0700)]
s3: VFS: vfs_media_harmony: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_extd_audit: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:03:10 +0000 (18:03 -0700)]
s3: VFS: vfs_extd_audit: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_ceph_snapshots: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:02:06 +0000 (18:02 -0700)]
s3: VFS: vfs_ceph_snapshots: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_catia: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:01:26 +0000 (18:01 -0700)]
s3: VFS: vfs_catia: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_cap: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:00:31 +0000 (18:00 -0700)]
s3: VFS: vfs_cap: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_audit: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 00:59:25 +0000 (17:59 -0700)]
s3: VFS: vfs_audit: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: lib: adouble: Add dirfsp to ad_convert_delete_adfile(). Use UNLINKAT instead...
Jeremy Allison [Mon, 16 Sep 2019 22:15:05 +0000 (15:15 -0700)]
s3: lib: adouble: Add dirfsp to ad_convert_delete_adfile(). Use UNLINKAT instead of UNLINK.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: lib: adouble: Add struct files_struct *dirfsp parameter to ad_convert().
Jeremy Allison [Fri, 13 Sep 2019 21:52:00 +0000 (14:52 -0700)]
s3: lib: adouble: Add struct files_struct *dirfsp parameter to ad_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Change delete_invalid_meta_stream() to use UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 21:21:28 +0000 (14:21 -0700)]
s3: VFS: vfs_fruit. Change delete_invalid_meta_stream() to use UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Change fruit_pread_meta_stream() to use UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 21:19:21 +0000 (14:19 -0700)]
s3: VFS: vfs_fruit. Change fruit_pread_meta_stream() to use UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_ad...
Jeremy Allison [Fri, 13 Sep 2019 21:11:46 +0000 (14:11 -0700)]
s3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_adouble() and convert to UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_st...
Jeremy Allison [Fri, 13 Sep 2019 21:10:16 +0000 (14:10 -0700)]
s3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_stream() and convert to UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add files_struct *dirfsp parameter to fruit_unlink_rsrc().
Jeremy Allison [Fri, 13 Sep 2019 21:08:08 +0000 (14:08 -0700)]
s3: VFS: vfs_fruit. Add files_struct *dirfsp parameter to fruit_unlink_rsrc().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_meta_st...
Jeremy Allison [Fri, 13 Sep 2019 20:46:00 +0000 (13:46 -0700)]
s3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_meta_stream() and convert to UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add files_struct *dirfsp parameter to fruit_unlink_meta().
Jeremy Allison [Fri, 13 Sep 2019 20:44:21 +0000 (13:44 -0700)]
s3: VFS: vfs_fruit. Add files_struct *dirfsp parameter to fruit_unlink_meta().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit: Convert fruit_rmdir_internal() to UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 20:43:29 +0000 (13:43 -0700)]
s3: VFS: vfs_fruit: Convert fruit_rmdir_internal() to UNLINKAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit: Add dirfsp files_struct pointer parameter to fruit_rmdir_internal().
Jeremy Allison [Fri, 13 Sep 2019 20:30:19 +0000 (13:30 -0700)]
s3: VFS: vfs_fruit: Add dirfsp files_struct pointer parameter to fruit_rmdir_internal().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit: Wrap fruit_rmdir() so we can add parameters.
Jeremy Allison [Fri, 13 Sep 2019 20:24:23 +0000 (13:24 -0700)]
s3: VFS: vfs_fruit: Wrap fruit_rmdir() so we can add parameters.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Change fruit_unlink_internal() to call UNLNKAT.
Jeremy Allison [Fri, 13 Sep 2019 20:20:36 +0000 (13:20 -0700)]
s3: VFS: vfs_fruit. Change fruit_unlink_internal() to call UNLNKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add files_struct *dirfsp to fruit_unlink_internal() so we can...
Jeremy Allison [Fri, 13 Sep 2019 20:18:28 +0000 (13:18 -0700)]
s3: VFS: vfs_fruit. Add files_struct *dirfsp to fruit_unlink_internal() so we can call UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Wrap Convert fruit_unlink() -> fruit_unlink_internal() so we...
Jeremy Allison [Fri, 13 Sep 2019 20:16:19 +0000 (13:16 -0700)]
s3: VFS: vfs_fruit. Wrap Convert fruit_unlink() -> fruit_unlink_internal() so we can add parameters.

Make fruit_unlink() a wrapper calling the internal version.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change rmdir_internals() to call SMB_VFS_UNLINKAT() in 2 places.
Jeremy Allison [Fri, 13 Sep 2019 19:34:31 +0000 (12:34 -0700)]
s3: smbd: Change rmdir_internals() to call SMB_VFS_UNLINKAT() in 2 places.

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change recursive_rmdir() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 19:29:41 +0000 (12:29 -0700)]
s3: smbd: Change recursive_rmdir() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change close_remove_share_mode() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 19:25:10 +0000 (12:25 -0700)]
s3: smbd: Change close_remove_share_mode() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change delete_all_streams() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 19:23:02 +0000 (12:23 -0700)]
s3: smbd: Change delete_all_streams() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change smb_set_file_unix_basic() to call SMB_VFS_UNLINKAT() in 3 places.
Jeremy Allison [Fri, 13 Sep 2019 18:33:53 +0000 (11:33 -0700)]
s3: smbd: Change smb_set_file_unix_basic() to call SMB_VFS_UNLINKAT() in 3 places.

Use conn->cwd_fsp as current fsp. This is horrible code and must
be removed.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: pysmbd: Change py_smbd_unlink() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 18:22:06 +0000 (11:22 -0700)]
s3: pysmbd: Change py_smbd_unlink() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change remove_msdfs_link() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 18:20:36 +0000 (11:20 -0700)]
s3: smbd: Change remove_msdfs_link() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change create_msdfs_link() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 18:17:45 +0000 (11:17 -0700)]
s3: smbd: Change create_msdfs_link() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: cmd_vfs: Change cmd_pathfunc() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 17:56:30 +0000 (10:56 -0700)]
s3: cmd_vfs: Change cmd_pathfunc() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_common: Convert unlink_acl_common(), acl_common_remove_object()...
Jeremy Allison [Tue, 17 Sep 2019 00:54:00 +0000 (17:54 -0700)]
s3: VFS: vfs_acl_common: Convert unlink_acl_common(), acl_common_remove_object() to UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_common: Add dirfsp, flags parameters to unlink_acl_common().
Jeremy Allison [Tue, 17 Sep 2019 00:50:17 +0000 (17:50 -0700)]
s3: VFS: vfs_acl_common: Add dirfsp, flags parameters to unlink_acl_common().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_xattr: Don't call unlink_acl_common() directly.
Jeremy Allison [Tue, 17 Sep 2019 00:44:33 +0000 (17:44 -0700)]
s3: VFS: vfs_acl_xattr: Don't call unlink_acl_common() directly.

Use a wrapper function so we can change the parameters.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_virusfilter: Change UNLINK -> UNLINKAT in infected_file_action_delete()
Jeremy Allison [Tue, 17 Sep 2019 00:41:10 +0000 (17:41 -0700)]
s3: VFS: vfs_virusfilter: Change UNLINK -> UNLINKAT in infected_file_action_delete()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_posix_eadb: Wrap posix_eadb_unlink() into a call to posix_eadb_unlink_in...
Jeremy Allison [Thu, 19 Sep 2019 17:32:41 +0000 (10:32 -0700)]
s3: VFS: vfs_posix_eadb: Wrap posix_eadb_unlink() into a call to posix_eadb_unlink_internal().

Allows UNLINKAT parameters to be passed. Change posix_eadb_unlink_internal()
to call UNLINKAT instead of UNLINK.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_audit. Implement unlinkat().
Jeremy Allison [Tue, 17 Sep 2019 00:57:25 +0000 (17:57 -0700)]
s3: VFS: vfs_audit. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_virusfilter. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:16:55 +0000 (14:16 -0700)]
s3: VFS: vfs_virusfilter. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_unityed_media. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:14:01 +0000 (14:14 -0700)]
s3: VFS: vfs_unityed_media. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_time_audit. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:11:20 +0000 (14:11 -0700)]
s3: VFS: vfs_time_audit. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_syncops. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:09:27 +0000 (14:09 -0700)]
s3: VFS: vfs_syncops. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_xattr: Convert streams_xattr_unlink_internal() to use UNLINKAT.
Jeremy Allison [Wed, 18 Sep 2019 02:10:24 +0000 (19:10 -0700)]
s3: VFS: vfs_streams_xattr: Convert streams_xattr_unlink_internal() to use UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_xattr. Wrap Convert streams_xattr_unlink() -> streams_xattr_unli...
Jeremy Allison [Wed, 18 Sep 2019 02:08:26 +0000 (19:08 -0700)]
s3: VFS: vfs_streams_xattr. Wrap Convert streams_xattr_unlink() -> streams_xattr_unlink_internal() so we can add parameters.

Make streams_xattr_unlink() a wrapper calling the internal version.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_xattr. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:00:24 +0000 (14:00 -0700)]
s3: VFS: vfs_streams_xattr. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_depot: Change streams_depot_unlink_internal() to call UNLINKAT().
Jeremy Allison [Wed, 18 Sep 2019 02:26:13 +0000 (19:26 -0700)]
s3: VFS: vfs_streams_depot: Change streams_depot_unlink_internal() to call UNLINKAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_depot. Wrap Convert streams_depot_unlink() -> streams_depot_unli...
Jeremy Allison [Wed, 18 Sep 2019 02:23:31 +0000 (19:23 -0700)]
s3: VFS: vfs_streams_depot. Wrap Convert streams_depot_unlink() -> streams_depot_unlink_internal() so we can add parameters.

Make streams_depot_unlink() a wrapper calling the internal version.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_depot. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 20:41:10 +0000 (13:41 -0700)]
s3: VFS: vfs_streams_depot. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_snapper. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 20:21:41 +0000 (13:21 -0700)]
s3: VFS: vfs_snapper. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_shadow_copy2. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 20:19:39 +0000 (13:19 -0700)]
s3: VFS: vfs_shadow_copy2. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_recycle: Change recycle_unlink_internal() to call UNLINKAT().
Jeremy Allison [Tue, 17 Sep 2019 00:30:49 +0000 (17:30 -0700)]
s3: VFS: vfs_recycle: Change recycle_unlink_internal() to call UNLINKAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_recycle: Wrap recycle_unlink() into a call to recycle_unlink_internal().
Jeremy Allison [Tue, 17 Sep 2019 00:22:58 +0000 (17:22 -0700)]
s3: VFS: vfs_recycle: Wrap recycle_unlink() into a call to recycle_unlink_internal().

Allows UNLINKAT parameters to be passed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_recycle. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 19:55:49 +0000 (12:55 -0700)]
s3: VFS: vfs_recycle. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_media_harmony. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 18:51:09 +0000 (11:51 -0700)]
s3: VFS: vfs_media_harmony. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_glusterfs. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 18:04:18 +0000 (11:04 -0700)]
s3: VFS: vfs_glusterfs. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_full_audit. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 17:50:06 +0000 (10:50 -0700)]
s3: VFS: vfs_full_audit. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 17:46:02 +0000 (10:46 -0700)]
s3: VFS: vfs_fruit. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_extd_audit. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 17:07:40 +0000 (10:07 -0700)]
s3: VFS: vfs_extd_audit. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_ceph_snapshots. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 17:05:00 +0000 (10:05 -0700)]
s3: VFS: vfs_ceph_snapshots. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_ceph. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 17:03:05 +0000 (10:03 -0700)]
s3: VFS: vfs_ceph. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_catia. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 16:38:42 +0000 (09:38 -0700)]
s3: VFS: vfs_catia. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_cap. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 16:36:34 +0000 (09:36 -0700)]
s3: VFS: vfs_cap. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_xattr_tdb. Implement unlinkat().
Jeremy Allison [Fri, 13 Sep 2019 17:12:38 +0000 (10:12 -0700)]
s3: VFS: vfs_xattr_tdb. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_posix_eadb. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 19:01:42 +0000 (12:01 -0700)]
s3: VFS: vfs_posix_eadb. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_xattr. Implement unlinkat().
Jeremy Allison [Wed, 11 Sep 2019 23:49:38 +0000 (16:49 -0700)]
s3: VFS: vfs_acl_xattr. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_tdb. Implement unlinkat().
Jeremy Allison [Wed, 11 Sep 2019 23:42:01 +0000 (16:42 -0700)]
s3: VFS: vfs_acl_tdb. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: Add SMB_VFS_UNLINKAT().
Jeremy Allison [Wed, 11 Sep 2019 21:37:31 +0000 (14:37 -0700)]
s3: VFS: Add SMB_VFS_UNLINKAT().

Currently identical to SMB_VFS_UNLINK().

Next, add to all VFS modules that implement
unlink and eventually remove unlink.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoctdb-tests: Update README
Martin Schwenke [Wed, 18 Sep 2019 06:32:40 +0000 (16:32 +1000)]
ctdb-tests: Update README

Bring this up to date.  Drop descriptions of command-line options
because these tend to bit-rot - refer to "run_tests.sh -h" instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Sep 26 06:01:33 UTC 2019 on sn-devel-184

4 years agoctdb-tests: Move simple tests to INTEGRATION/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 06:00:52 +0000 (16:00 +1000)]
ctdb-tests: Move simple tests to INTEGRATION/ subdirectory

Split some tests out into database/ and failover/ subdirectories.
Rename the remaining tests in simple/.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move complex tests to CLUSTER/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 05:59:31 +0000 (15:59 +1000)]
ctdb-tests: Move complex tests to CLUSTER/ subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Convert local daemons include file into top-level include
Martin Schwenke [Thu, 5 Sep 2019 04:01:20 +0000 (14:01 +1000)]
ctdb-tests: Convert local daemons include file into top-level include

Do the same with the alternative code for real clusters.

Both of these can now be used by other test suites.

Fix some basic shellcheck warnings (e.g. avoid word-splitting by
quoting) while moving code and add the new files to the shellcheck
test.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Drop use of array in run_tests()
Martin Schwenke [Mon, 9 Sep 2019 05:01:49 +0000 (15:01 +1000)]
ctdb-tests: Drop use of array in run_tests()

This doesn't accomplish anything.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Drop custom handling for unit tests
Martin Schwenke [Mon, 9 Sep 2019 04:59:38 +0000 (14:59 +1000)]
ctdb-tests: Drop custom handling for unit tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Skip README files in test directories/collections
Martin Schwenke [Wed, 25 Sep 2019 06:37:46 +0000 (16:37 +1000)]
ctdb-tests: Skip README files in test directories/collections

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Recurse into directories instead of explicitly looping
Martin Schwenke [Mon, 9 Sep 2019 04:47:26 +0000 (14:47 +1000)]
ctdb-tests: Recurse into directories instead of explicitly looping

run_tests() already has a loop, so use it.

This means collections of test suites can be handled - but explicitly
check valid collection names to avoid running junk.

Add special cases for simple and complex.  These will be removed when
those test suites are moved to collections.  This seems to be the
smallest amount of churn to support bisection.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Fold find_and_run_one_test() in to run_tests()
Martin Schwenke [Mon, 9 Sep 2019 01:40:21 +0000 (11:40 +1000)]
ctdb-tests: Fold find_and_run_one_test() in to run_tests()

The additional function makes the logic harder to understand.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move tool tests to UNIT/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 00:51:17 +0000 (10:51 +1000)]
ctdb-tests: Move tool tests to UNIT/ subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move takeover_helper tests to UNIT/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 00:49:53 +0000 (10:49 +1000)]
ctdb-tests: Move takeover_helper tests to UNIT/ subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move takeover tests to UNIT/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 00:49:17 +0000 (10:49 +1000)]
ctdb-tests: Move takeover tests to UNIT/ subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move shellcheck tests to UNIT/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 00:48:05 +0000 (10:48 +1000)]
ctdb-tests: Move shellcheck tests to UNIT/ subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move onnode tests to UNIT/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 00:47:21 +0000 (10:47 +1000)]
ctdb-tests: Move onnode tests to UNIT/ subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move eventscript tests to UNIT/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 00:44:45 +0000 (10:44 +1000)]
ctdb-tests: Move eventscript tests to UNIT/ subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move eventd tests to UNIT/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 00:43:38 +0000 (10:43 +1000)]
ctdb-tests: Move eventd tests to UNIT/ subdirectory

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Move cunit tests to UNIT/ subdirectory
Martin Schwenke [Mon, 9 Sep 2019 00:42:11 +0000 (10:42 +1000)]
ctdb-tests: Move cunit tests to UNIT/ subdirectory

The UNIT subdirectory directory will contain all unit tests.  Use an
uppercase name to avoid conflicts with source code subdirectories.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agowaf: Use waf function to add for -Wl,--as-needed
Andreas Schneider [Mon, 23 Sep 2019 15:21:51 +0000 (17:21 +0200)]
waf: Use waf function to add for -Wl,--as-needed

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Sep 25 16:56:40 UTC 2019 on sn-devel-184

4 years agowaf:replace: Do not link against libpthread if not necessary
Andreas Schneider [Mon, 23 Sep 2019 14:53:12 +0000 (16:53 +0200)]
waf:replace: Do not link against libpthread if not necessary

On Linux we should avoid linking everything against libpthread. Symbols
used my most application are provided by glibc and code which deals with
threads has to explicitly link against libpthread.  This avoids setting
LDFLAGS=-pthread globally.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Pair-Programmed-With: Isaac Boukris <iboukris@gmail.com>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>