metze/samba/wip.git
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>
4 years agothird_party: Link uid_wrapper against pthread
Andreas Schneider [Mon, 23 Sep 2019 15:40:13 +0000 (17:40 +0200)]
third_party: Link uid_wrapper against pthread

uid_wrapper uses pthread_atfork() which is only provided by libpthread.                                                                                   │····················
So we need an explicit dependency.

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>
4 years agothird_party: Link nss_wrapper against pthread
Andreas Schneider [Mon, 23 Sep 2019 15:39:29 +0000 (17:39 +0200)]
third_party: Link nss_wrapper against pthread

nss_wrapper uses pthread_atfork() which is only provided by libpthread.
So we need an explicit dependency.

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>
4 years agothird_party: Only link cmocka against librt if really needed
Andreas Schneider [Mon, 23 Sep 2019 15:04:57 +0000 (17:04 +0200)]
third_party: Only link cmocka against librt if really needed

cmocka also uses clock_gettime().

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>
4 years agopthreadpool: Only link pthreadpool against librt if we have to
Andreas Schneider [Mon, 23 Sep 2019 14:10:35 +0000 (16:10 +0200)]
pthreadpool: Only link pthreadpool against librt if we have to

This calls clock_gettime() which is available in glibc on Linux. If the
wscript in libreplace detected that librt is needed for clock_gettime()
we have to link against it.

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>
4 years agoreplace: Only link against librt if really needed
Andreas Schneider [Mon, 23 Sep 2019 13:14:24 +0000 (15:14 +0200)]
replace: Only link against librt if really needed

fdatasync() and clock_gettime() are provided by glibc on Linux, so there
is no need to link against librt. Checks have been added so if there are
platforms which require it are still functional.

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>
4 years agos3:waf: Do not check for nanosleep() as we don't use it anywhere
Andreas Schneider [Mon, 23 Sep 2019 13:18:55 +0000 (15:18 +0200)]
s3:waf: Do not check for nanosleep() as we don't use it anywhere

We use usleep() in the meantime.

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>
4 years agos4:scripting: make samba-gpupdate heed --disable-python
Philipp Gesang [Thu, 19 Sep 2019 07:03:45 +0000 (09:03 +0200)]
s4:scripting: make samba-gpupdate heed --disable-python

Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power<npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Sep 25 11:06:04 UTC 2019 on sn-devel-184

4 years agos3/librpc/crypto: clang: Fixes Value stored to 'ret' is never read
Noel Power [Thu, 8 Aug 2019 13:15:14 +0000 (13:15 +0000)]
s3/librpc/crypto: clang: Fixes Value stored to 'ret' is never read

Fixes:

source3/librpc/crypto/gse_krb5.c:63:3: warning: Value stored to 'ret' is never read <--[clang]
                ret = smb_krb5_kt_free_entry(krbctx, &kt_entry);
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3/libads: clang: Fix Array access results in a null pointer dereference
Noel Power [Thu, 8 Aug 2019 13:12:39 +0000 (13:12 +0000)]
s3/libads: clang: Fix Array access results in a null pointer dereference

Fixes:

source3/libads/cldap.c:400:6: warning: Array access (from variable 'responses') results in a null pointer dereference <--[clang]
        if (responses[0] == NULL) {
            ^
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3/librpc/crypto: clang: warning: Value stored to 'gss_maj' is never read
Noel Power [Fri, 2 Aug 2019 10:45:48 +0000 (10:45 +0000)]
s3/librpc/crypto: clang: warning: Value stored to 'gss_maj' is never read

Fixes: Value stored to 'gss_maj' is never read
source3/librpc/crypto/gse.c:562:3: warning: Value stored to 'gss_maj' is never read <--[clang]
                gss_maj = gss_release_buffer(&gss_min, &out_data);
                ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source3/librpc/crypto/gse.c:687:3: warning: Value stored to 'gss_maj' is never read <--[clang]
                gss_maj = gss_release_buffer(&gss_min, &out_data);
                ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source3/librpc/crypto/gse.c:739:3: warning: Value stored to 'gss_maj' is never read <--[clang]
                gss_maj = gss_release_buffer(&gss_min, &msg_min);
                ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source3/librpc/crypto/gse.c:742:3: warning: Value stored to 'gss_maj' is never read <--[clang]
                gss_maj = gss_release_buffer(&gss_min, &msg_maj);
                ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4/libcli/clideltree.c: clang: Value stored to 'status' is never read
Noel Power [Thu, 8 Aug 2019 14:10:30 +0000 (15:10 +0100)]
s4/libcli/clideltree.c: clang: Value stored to 'status' is never read

Fixes:

source4/libcli/clideltree.c:113:3: warning: Value stored to 'status' is never read <--[clang]

status = smbcli_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL, 0);
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source4/libcli/clideltree.c:131:3: warning: Value stored to 'status' is never read <--[clang]
                status = smbcli_setatr(dstate.tree, dname, FILE_ATTRIBUTE_NORMAL, 0);
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4/libcli/smb2: clang: Fix 'value stored to 'status' is never read'
Noel Power [Mon, 29 Jul 2019 11:44:26 +0000 (11:44 +0000)]
s4/libcli/smb2: clang: Fix 'value stored to 'status' is never read'

Fixes:

source4/libcli/smb2/util.c:134:3: warning: Value stored to 'status' is never read <--[clang]
                status = smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL);
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source4/libcli/smb2/util.c:187:5: warning: Value stored to 'status' is never read <--[clang]
                                status = smb2_util_setatr(tree, name, FILE_ATTRIBUTE_NORMAL);
                                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source4/libcli/smb2/util.c:209:3: warning: Value stored to 'status' is never read <--[clang]
                status = smb2_util_setatr(tree, dname, FILE_ATTRIBUTE_NORMAL);
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4/libcli/smb2: clang: Fix Passed-by-value arg contains uninitialized data
Noel Power [Mon, 29 Jul 2019 11:22:29 +0000 (11:22 +0000)]
s4/libcli/smb2: clang: Fix Passed-by-value arg contains uninitialized data

Fixes:

source4/libcli/smb2/getinfo.c:222:11: warning: Passed-by-value struct argument contains uninitialized data (e.g., field: 'data') <--[clang]
        status = smb_raw_fsinfo_passthru_parse(b.out.blob, mem_ctx, io->generic.level, io);
                 ^
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4/libcli/raw: clang: Fix 'Value stored to 'p' is never read'
Noel Power [Fri, 26 Jul 2019 16:23:45 +0000 (16:23 +0000)]
s4/libcli/raw: clang: Fix 'Value stored to 'p' is never read'

Fixes:

source4/libcli/raw/clisession.c:198:4: warning: Value stored to 'p' is never read <--[clang]
                        p += smbcli_req_pull_string(&req->in.bufinfo, mem_ctx, &parms->old.out.domain, p, -1, STR_TERMINATE);
                        ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source4/libcli/raw/clisession.c:212:5: warning: Value stored to 'p' is never read <--[clang]
                                p += smbcli_req_pull_string(&req->in.bufinfo, mem_ctx, &parms->nt1.out.domain, p, -1, STR_TERMINATE);
                                ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source4/libcli/raw/clisession.c:232:3: warning: Value stored to 'p' is never read <--[clang]
                p += smbcli_req_pull_string(&req->in.bufinfo, mem_ctx, &parms->spnego.out.workgroup, p, -1, STR_TERMINATE);
                ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4/libcli/raw: clang: Fix 'Dereference of null pointer'
Noel Power [Fri, 26 Jul 2019 16:18:49 +0000 (16:18 +0000)]
s4/libcli/raw: clang: Fix 'Dereference of null pointer'

Fixes:

source4/libcli/raw/rawfileinfo.c:597:2: warning: Dereference of null pointer <--[clang]
        SMBCLI_CHECK_WCT(req, 10);
        ^
source4/libcli/raw/rawfileinfo.c:639:2: warning: Dereference of null pointer <--[clang]
        SMBCLI_CHECK_WCT(req, 11);
        ^

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos4/libcli/raw: clang: Fix 'Access to field results in a deref of a null ptr
Noel Power [Fri, 26 Jul 2019 15:06:54 +0000 (15:06 +0000)]
s4/libcli/raw: clang: Fix 'Access to field results in a deref of a null ptr

Fixes:

source4/libcli/raw/rawfileinfo.c:301:56: warning: Access to field 'transport' results in a dereference of a null pointer (loaded from variable 'session') <--[clang]
    parms->standard.out.create_time = raw_pull_dos_date2(session->transport,
                                                                         ^
source4/libcli/raw/rawfileinfo.c:314:55: warning: Access to field 'transport' results in a dereference of a null pointer (loaded from variable 'session') <--[clang]
    parms->ea_size.out.create_time = raw_pull_dos_date2(session->transport,

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agovfs_fileid: add "fsname_norootdir_ext" option
Ralph Boehme [Tue, 3 Sep 2019 13:33:42 +0000 (15:33 +0200)]
vfs_fileid: add "fsname_norootdir_ext" option

This can be used to deliberately break lock coherency between all smbd processes
in the whole cluster for the root directory of a share.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Sep 25 00:48:45 UTC 2019 on sn-devel-184

4 years agovfs_fileid: add extid mapping hooks
Ralph Boehme [Thu, 12 Sep 2019 12:36:17 +0000 (14:36 +0200)]
vfs_fileid: add extid mapping hooks

For this always ends up calling fileid_extid_mapping_zero(), so no change in
behaviour. This will change in a subsequent commit.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agoselftest/Samba3.pm: use "winbind use krb5 enterprise principals = yes" for ad_member
Stefan Metzmacher [Wed, 18 Sep 2019 06:10:26 +0000 (08:10 +0200)]
selftest/Samba3.pm: use "winbind use krb5 enterprise principals = yes" for ad_member

This demonstrates that can do krb5_auth in winbindd without knowning about trusted domains.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Sep 24 19:51:29 UTC 2019 on sn-devel-184

4 years agoselftest/Samba3.pm: use "winbind scan trusted domains = no" for ad_member
Stefan Metzmacher [Wed, 18 Sep 2019 06:02:38 +0000 (08:02 +0200)]
selftest/Samba3.pm: use "winbind scan trusted domains = no" for ad_member

This demonstrates that we rely on knowning about trusted domains before
we can do krb5_auth in winbindd.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agoselftest/tests.py: test pam_winbind for trusts domains
Stefan Metzmacher [Sat, 10 Jun 2017 12:38:40 +0000 (14:38 +0200)]
selftest/tests.py: test pam_winbind for trusts domains

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agoselftest: Export TRUST information in the ad_member target environment
Andreas Schneider [Mon, 20 Mar 2017 10:39:41 +0000 (11:39 +0100)]
selftest: Export TRUST information in the ad_member target environment

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agoselftest/tests.py: test pam_winbind with a lot of username variations
Stefan Metzmacher [Wed, 18 Sep 2019 12:03:34 +0000 (14:03 +0200)]
selftest/tests.py: test pam_winbind with a lot of username variations

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agoselftest/tests.py: test pam_winbind with krb5_auth
Stefan Metzmacher [Wed, 18 Sep 2019 06:08:57 +0000 (08:08 +0200)]
selftest/tests.py: test pam_winbind with krb5_auth

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agoselftest/tests.py: prepare looping over pam_winbindd tests
Stefan Metzmacher [Tue, 17 Sep 2019 23:25:23 +0000 (01:25 +0200)]
selftest/tests.py: prepare looping over pam_winbindd tests

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>