1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

119371 Commits

Author SHA1 Message Date
Jeremy Allison
56b355d079 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>
2019-09-26 17:20:48 +00:00
Jeremy Allison
3d6a8d9ae0 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>
2019-09-26 17:20:48 +00:00
Jeremy Allison
66d86efb9a 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>
2019-09-26 17:20:48 +00:00
Jeremy Allison
244c3820a8 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>
2019-09-26 17:20:48 +00:00
Jeremy Allison
f8bdf5db6e 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>
2019-09-26 17:20:48 +00:00
Jeremy Allison
63d814047f 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>
2019-09-26 17:20:48 +00:00
Jeremy Allison
6ef40bdb94 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
96aeaed858 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
88249762a4 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
488c656723 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
1023ec61a9 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
70f5cbc54d 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
b355a9565d 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
83e0cf6dc9 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
d69a9ba7e3 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
0b3b83c153 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>
2019-09-26 17:20:47 +00:00
Jeremy Allison
d7e763ef05 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
e73caaed82 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
7b2fda0576 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
c81932fdfe 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
62f92f8b29 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
43b9d9adfe 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
6f0cc51b1f 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
1f8bdb3974 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
8d9ff50f85 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
8c43f6179a 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>
2019-09-26 17:20:46 +00:00
Jeremy Allison
1ee6c9d8a4 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
6c28a7749b 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
2a4eb0782b 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
0c16e77ae1 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
34d7b18cde 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
797f24fd4d 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
f372f2f58c 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
4794e8dbb1 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
95197108be 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
19c8cfa287 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>
2019-09-26 17:20:45 +00:00
Jeremy Allison
2a7e472e5c 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>
2019-09-26 17:20:44 +00:00
Jeremy Allison
2c90d2b4f0 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>
2019-09-26 17:20:44 +00:00
Jeremy Allison
c58692cee9 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>
2019-09-26 17:20:44 +00:00
Martin Schwenke
24f04c1cc5 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
2019-09-26 06:01:33 +00:00
Martin Schwenke
8a5c4a60e1 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>
2019-09-26 04:45:37 +00:00
Martin Schwenke
658068184f ctdb-tests: Move complex tests to CLUSTER/ subdirectory
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-09-26 04:45:37 +00:00
Martin Schwenke
df6800e330 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>
2019-09-26 04:45:37 +00:00
Martin Schwenke
384381fbff 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>
2019-09-26 04:45:37 +00:00
Martin Schwenke
c438e0db45 ctdb-tests: Drop custom handling for unit tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-09-26 04:45:37 +00:00
Martin Schwenke
4046baad5c ctdb-tests: Skip README files in test directories/collections
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-09-26 04:45:37 +00:00
Martin Schwenke
75393cab0f 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>
2019-09-26 04:45:37 +00:00
Martin Schwenke
4947fa5ffa 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>
2019-09-26 04:45:37 +00:00
Martin Schwenke
1061bdf29d ctdb-tests: Move tool tests to UNIT/ subdirectory
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-09-26 04:45:37 +00:00
Martin Schwenke
9585ece00c ctdb-tests: Move takeover_helper tests to UNIT/ subdirectory
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-09-26 04:45:36 +00:00