summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* test: Show that smbd does not handle EINTR from open() correctlyVolker Lendecke2020-02-202-0/+75
| | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* test: Intercept open in vfs_error_injectVolker Lendecke2020-02-201-0/+17
| | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Run a clustered testMartin Schwenke2020-02-191-0/+30
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-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>
* smbd: Fix a typoVolker Lendecke2020-02-191-1/+1
| | | | | 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-185-0/+163
| | | | | | | 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-182-0/+89
| | | | | | | | 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>
* s3:modules: add vfs_io_uring moduleStefan Metzmacher2020-02-153-0/+562
| | | | | | | | | | | | | | | | | | | | | | 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
* s3:tests: Add smbclient test for 'force create mode = 0664'Andreas Schneider2020-02-142-0/+73
| | | | | | | | 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
* auth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL)Volker Lendecke2020-02-141-1/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL)Volker Lendecke2020-02-141-1/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbclient: Don't cli_posix_stat() twiceVolker Lendecke2020-02-101-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Improve an error messageVolker Lendecke2020-02-101-2/+3
| | | | | | | Include the path where db_open() tried to find the ctdb socket Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* krb5_wrap: move source3/libads/krb5_errs.c to lib/krb5_wrap/krb5_errs.cStefan Metzmacher2020-02-1012-157/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbindd_cm: fallback to anonymous for INVALID_COMPUTER_NAME and ↵Stefan Metzmacher2020-02-101-0/+4
| | | | | | | | | | NO_SUCH_DOMAIN too These error codes are soon propagated in addition to INVALID_ACOUNT_NAME through the gensec/spnego layers. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* smbspool: add more error codes to the auth_errors arrayStefan Metzmacher2020-02-101-0/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* smbspool: use one element per line for the auth_errors arrayStefan Metzmacher2020-02-101-6/+12
| | | | | | | This makes it more obvious if the later change the array. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:libads: prefer ENCTYPE_AES256_CTS_HMAC_SHA1_96 in ads_keytab_add_entry()Stefan Metzmacher2020-02-101-3/+3
| | | | | | | | | This is currently not critical as we only use keytabs only as acceptor, but in future we'll also use them for kinit() and there we should prefer the newest type. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:libads: make use auth4_context_{for,get}_PAC_DATA_CTR() in ↵Stefan Metzmacher2020-02-101-68/+2
| | | | | | | kerberos_return_pac() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth/kerberos: add auth4_context_{for,get}_PAC_DATA_CTR() helpersStefan Metzmacher2020-02-102-6/+2
| | | | | | | | This adds a generic way to get to the raw (verified) PAC and will be used in multiple places in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* smbd: Remove overriding file_attributes with unix_mode in the VFSVolker Lendecke2020-02-072-20/+11
| | | | | | | | | | Internally to open.c this is still used, but that can go away next. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Feb 7 22:27:48 UTC 2020 on sn-devel-184
* smbd: Allow a Posix create context to override the unix modeVolker Lendecke2020-02-071-0/+31
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Add posix create ctx to CREATE_FILE for posix operationsVolker Lendecke2020-02-072-7/+82
| | | | | | | This will replace overloading file attributes Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Add a "done:" exit for get_posix_fsp()Volker Lendecke2020-02-071-1/+3
| | | | | | | We'll have another exit with the next commit Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>