summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* selftest: Fix an uninitialised variable warning.Martin Schwenke2020-02-191-1/+1
| | | | | | | | | If $nmbd is not "yes" then this can result in a warning. Introduced in commit 676261fa08273114b888bb46f65de3de091b615b. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* selftest: Fix a warning messageVolker Lendecke2020-02-191-2/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* selftest: Add "share_dir" as an argument to Samba3::provision()Volker Lendecke2020-02-191-1/+1
| | | | | | | Default to the previous value Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* selftest: Allow "netbios name" to be overriden in Samba3::provision()Volker Lendecke2020-02-191-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* lib: Remove unneded #include malloc.hVolker Lendecke2020-02-191-3/+0
| | | | | | | We do the mallinfo() call in talloc_report_printf.c now Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* torture4: Align integer typesVolker Lendecke2020-02-191-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* torture4: Use strlcpy() with size check instead of snprintf()Volker Lendecke2020-02-191-3/+13
| | | | | | | It's just test code, but we should give good examples where possible Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* smbd: Fix a typoVolker Lendecke2020-02-191-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* lib: Fix rotating nonstandard debug class log filesVolker Lendecke2020-02-191-1/+1
| | | | | | | | Looking at the same pointer in the loop does not really make sense to me Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* s3: DFS: Remove is_msdfs_link_internal() - no longer used.Jeremy Allison2020-02-181-74/+0
| | | | | | | | | | | All DFS links are now read through the VFS and not via symlink calls. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Tue Feb 18 22:34:16 UTC 2020 on sn-devel-184
* s3: DFS: Change the last use of is_msdfs_link_internal() -> ↵Jeremy Allison2020-02-181-22/+19
| | | | | | | | | SMB_VFS_READ_DFS_PATHAT() inside form_junctions(). is_msdfs_link_internal() is no longer used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: DFS: Replace calls to is_msdfs_link_internal() inside dfs_path_lookup() ↵Jeremy Allison2020-02-181-31/+22
| | | | | | | with SMB_VFS_READ_DFS_PATHAT(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: DFS: Change dfs_path_lookup() to return struct referral list and count ↵Jeremy Allison2020-02-181-29/+27
| | | | | | | | | | directly. Remove external parse of returned link targetpath, expose the parsing previously added to dfs_path_lookup(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: DFS: Parse the returned target path in dfs_path_lookup().Jeremy Allison2020-02-181-0/+25
| | | | | | | | Currently unused, but this will ease the transition to using SMB_VFS_READ_DFS_PATHAT(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: DFS: Change simple is_msdfs_link() call to use SMB_VFS_READ_DFS_PATHAT().Jeremy Allison2020-02-181-2/+5
| | | | | | | | This will need an extra dirfsp parameter in future, but this is the easiest change for now. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: vfs_time_audit: Add read_dfs_pathat().Jeremy Allison2020-02-181-0/+29
| | | | | | | Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: vfs_full_audit: Add read_dfs_pathat().Jeremy Allison2020-02-181-0/+28
| | | | | | | Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: catia: Add read_dfs_pathat().Jeremy Allison2020-02-181-0/+42
| | | | | | | Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: cap: Add cap_read_dfs_pathat().Jeremy Allison2020-02-181-1/+37
| | | | | | | Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: shadow_copy2: Add shadow_copy2_read_dfs_pathat().Jeremy Allison2020-02-181-0/+55
| | | | | | | Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: gluster: Add vfs_gluster_read_dfs_pathat().Jeremy Allison2020-02-181-0/+98
| | | | | | | Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: ceph: Add vfswrap_ceph_read_dfs_pathat().Jeremy Allison2020-02-181-0/+100
| | | | | | | Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: VFS: Add SMB_VFS_READ_DFS_PATHAT().Jeremy Allison2020-02-187-0/+190
| | | | | | | Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: dfs: Clean up exits / talloc heirarchy in parse_msdfs_symlink().Jeremy Allison2020-02-181-1/+10
| | | | | | | Ensure on error or clean return we don't leave memory on mem_ctx. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: dfs: Make parameter names consistent.Jeremy Allison2020-02-181-7/+7
| | | | | | | Initialize reflist to NULL. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: dfs: Allow parse_msdfs_symlink() to be called with NULL pointers.Jeremy Allison2020-02-181-4/+8
| | | | | | | In case we don't want all the data. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: dfs: Apply some README.Coding to parse_msdfs_symlink().Jeremy Allison2020-02-181-8/+8
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: dfs: Make parse_msdfs_symlink() external.Jeremy Allison2020-02-182-5/+10
| | | | | | | So it can be called by a future new VFS call. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: dfs: Move lp_msdfs_shuffle_referrals() call out of ↵Jeremy Allison2020-02-181-5/+5
| | | | | | | | | parse_msdfs_symlink(). Removes dependency on snum for what is text parsing code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: smbd: dfs: Cleanup, reformat calls to parse_msdfs_symlink()Jeremy Allison2020-02-181-3/+10
| | | | | | | Make parameter easier to change. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: DFS: Don't allow link deletion on a read-only share.Jeremy Allison2020-02-181-0/+11
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14269 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: DFS: Don't allow link creation on a read-only share.Jeremy Allison2020-02-181-0/+10
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14269 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:tests: Add test for a dropbox with dir mode 0733Andreas Schneider2020-02-183-0/+98
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Feb 18 21:07:44 UTC 2020 on sn-devel-184
* lib: Fix a shutdown crash with "clustering = yes"Volker Lendecke2020-02-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a bit confusing now, sorry for that: register_msg_pool_usage() in the ctdb case uses messaging_ctdb_register_tevent_context(), which talloc_reference()s the central struct messaging_ctdb_fde_ev of the messaging_ctdb_context. In messaging_reinit(), we talloc_free only one of those references and allocate a new messaging_ctdb_fde_ev. The remaining messaging_ctdb_fde_ev should have been deleted as well, but due to the second reference this does not happen. When doing the shutdown messaging_ctdb_fde_ev_destructor() is called twice, once on the properly reinitialized fde_ev, and once much later on the leftover one which references invalid data structures. By the way, this is not a problem with talloc_reference(), this would have happened with explicit refcounting too. Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Baumbach <bb@sernet.de> Autobuild-Date(master): Tue Feb 18 13:05:53 UTC 2020 on sn-devel-184
* lib: Introduce messaging_context->per_process_talloc_ctxVolker Lendecke2020-02-181-29/+55
| | | | | | | | | | | | | Consolidate "msg_dgm_ref" and "msg_ctdb_ref": The only purpose of those pointers was to TALLOC_FREE() them in messaging_reinit(). We'll have a third entity to talloc_free() in the next commit, make that simpler. Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Add a TALLOC_CTX to base register_msg_pool_usage() onVolker Lendecke2020-02-183-4/+6
| | | | | | | | | | Add a simple way to deactivate the registration Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Simplify register_msg_pool_usage()Volker Lendecke2020-02-181-38/+19
| | | | | | | | | | | | We can do as much as we want in the filter. This gives us automatic retry, we don't have to do the messaging_filtered_read_send() over and over again Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-docs: Provide example commands for "ctdb event ..."Martin Schwenke2020-02-181-2/+4
| | | | | | | | | | | | The example output doesn't tell a user what command generated it. Adding the command makes the examples much more useful. Reported-by: Stefan Kania <stefan@kania-online.de> 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): Tue Feb 18 04:22:56 UTC 2020 on sn-devel-184
* ctdb-tests: Flag setup, startup, shutdown failures as test errorsMartin Schwenke2020-02-181-3/+3
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Dump logs on shutdown failureMartin Schwenke2020-02-181-4/+21
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Avoid shutdown error when daemon already cleanly shut downMartin Schwenke2020-02-181-1/+4
| | | | | | | | | This depends on a small amount of internal knowledge but is the cleanest way of avoiding errors for nodes that have already been shut down. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Rationalise node stop/start/restartMartin Schwenke2020-02-186-50/+30
| | | | | | | | | | | | | Separate functions are not needed for stopping/starting/restarting individual nodes. The stop and start functions essentially just use onnode, though for local daemons this is embedded in local_daemons.sh. So, just provide one stop and one start function that takes an optional nodespec, defaulting to all nodes. Restarting becomes common. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Fix signed/unsigned comparisonMartin Schwenke2020-02-181-1/+1
| | | | | | | | | | csbuild says: ctdb/server/ctdb_lock.c: scope_hint: In function ‘ctdb_find_lock_context’ ctdb/server/ctdb_lock.c:671:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Check for lock count underflowMartin Schwenke2020-02-181-0/+3
| | | | | | | This is a programming error. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Remove signed/unsigned comparisonsAmitay Isaacs2020-02-181-5/+5
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* s3:modules: add vfs_io_uring moduleStefan Metzmacher2020-02-155-0/+670
| | | | | | | | | | | | | | | | | | | | | | The module makes use of the new io_uring infrastructure (intruduced in linux 5.1), see https://lwn.net/Articles/778411/ and http://git.kernel.dk/cgit/liburing/ Currently this only implements SMB_VFS_{PREAD,PWRITE,FSYNC}_SEND/RECV and avoids the overhead of our userspace threadpool. In future we'll hopefully make more use of more advanced io_uring features. For now we don't have automated tests as our test infrastructure doesn't use a recent kernel. At least we're able to do compile tests on fedora31. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Feb 15 11:37:45 UTC 2020 on sn-devel-184
* bootstrap: replace libaio-dev/libaio-devel with liburing-dev/liburing-develStefan Metzmacher2020-02-1533-33/+21
| | | | | | | We'll never use libaio, but will soon add a io_uring vfs module. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/replace: remove unused check for aio.hStefan Metzmacher2020-02-151-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:tests: Add smbclient test for 'force create mode = 0664'Andreas Schneider2020-02-143-0/+81
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Feb 14 20:16:04 UTC 2020 on sn-devel-184
* s4-auth: Allow simple bind login of a user with an @ in the samAccountNameAndrew Bartlett2020-02-142-2/+21
| | | | | | | | | | | | | | | | LDAP Simple BIND authentications have already been mapped to a DOMAIN\username pair and should not be mapped twice. This appears to be a regression in 09e24ce40f89ac2f03d0c5fefa8b59f0d113fa6b included in Samba 4.7. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13598 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Feb 14 17:13:33 UTC 2020 on sn-devel-184