]>
git.ipfire.org Git - thirdparty/samba.git/log
Günther Deschner [Tue, 22 Apr 2025 09:45:15 +0000 (11:45 +0200)]
docs-xml: only generate prometheus manpage when configured
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Thu, 8 May 2025 13:11:17 +0000 (15:11 +0200)]
smbd: Simplify synthetic_smb_fname_split()
Remove the "posix_path" parameter, all callers just passed in "false".
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri May 9 11:02:41 UTC 2025 on atb-devel-224
Volker Lendecke [Thu, 8 May 2025 13:06:23 +0000 (15:06 +0200)]
smbd: Handle the "posix" special case outside of synthetic_smb_fname_split
See next patch
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Thu, 8 May 2025 13:00:34 +0000 (15:00 +0200)]
smbd: Remove the "posix_pathnames" global variable
This was only set from the smb1 trans2 call negotiating smb1 unix
extensions. This means for none of the callers in cmd_vfs and pysmbd
this could ever have been set to "true". The only real caller is
init_smb1_request(), and there we have the originating xconn with its
flags available for direct query.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Mon, 5 May 2025 08:41:32 +0000 (10:41 +0200)]
third_party: Update socket_wrapper to version 1.5.0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May 6 14:06:49 UTC 2025 on atb-devel-224
Anoop C S [Tue, 4 Mar 2025 10:45:05 +0000 (16:15 +0530)]
vfs_ceph_snapshots: Always calculate absolute snapshot path
Use the same logic from shadow_copy2 module to always prepend the
connectpath to the relative snapshot path so as to return converted
path corresponding to the file's share root.
Please note that with the current working directory staying at the
connectpath level we are safe to prefix it to the smb_filename. In
other words it seems we never get past the connectpath internally
during normal file system operations via chdir(). Since all relative
paths are now based on dirfsp we could constitute absolute path by
prepending the connectpath to full_path_from_dirfsp_atname() output
ignoring the current working directory.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15819
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Wed Apr 30 11:32:59 UTC 2025 on atb-devel-224
Anoop C S [Tue, 4 Mar 2025 09:39:33 +0000 (15:09 +0530)]
vfs_ceph_snapshots: Use full path from dirfsp at smb_fname
In ceph_snap_gmt_openat() we hand in the incoming smb_fname as it is
to ceph_snap_gmt_strip_snapshot() which is then passed on to derive
the actual snapshot path using ceph_snap_gmt_convert(). But this can
go wrong in ceph_snap_gmt_convert_dir() while opening the snapdir.
Unless we constitute the full path from dirfsp at the first place we
always end up opening the snapdir from the parent directory with
OpenDir().
For example with dirfsp("foobar") and smb_fname("shift.txt"), we open
snapdir from share root because parent is calculated as empty string
via ceph_snap_get_parent_path(). Instead we could construct the full
path from dirfsp using full_path_from_dirfsp_atname() to ensure we
don't open the wrong snapdir.
Since we have access to the twrp token at VFS layer it doesn't make
much sense to make use of ceph_snap_gmt_strip_snapshot() in openat.
We could instead directly act based on already available twrp token
avoiding an extra copy of incoming smb_filename.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15819
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: David Disseldorp ddiss@samba.org
Andreas Schneider [Mon, 28 Apr 2025 12:20:59 +0000 (14:20 +0200)]
gitlab-ci: Update Fedora to version 42
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr 30 09:41:38 UTC 2025 on atb-devel-224
Stefan Metzmacher [Tue, 22 Apr 2025 13:18:09 +0000 (15:18 +0200)]
lib/util: let dump_data_diff() pass omit_zero_bytes to dump_data_diff_cb()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Apr 29 17:56:37 UTC 2025 on atb-devel-224
Noel Power [Wed, 23 Apr 2025 16:15:40 +0000 (17:15 +0100)]
pysmbd: fix samba.tests.samba_tool.ntacl failure due to errno overwrite
some functions in source3/smbd/pysmbd.c when deleting stack frame
can modify errno. (and in one case causes failure with
test samba.tests.samba_tool.ntacl)
this is related to newer versions of lmdb (at least version 0.9.30)
[1(0)/1 at 20s] samba.tests.samba_tool.ntacl(ad_dc:local)
2025-04-23T16:18:23.341528+00:00 addc.addom.samba.example.com [13640]: set_nt_acl_conn: init_files_struct failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
UNEXPECTED(failure): samba.tests.samba_tool.ntacl.samba.tests.samba_tool.ntacl.NtACLCmdGetSetTestCase.test_set_expect_file_not_found(ad_dc:local)
REASON: Exception: Exception: Traceback (most recent call last):
File "/home/npower/samba-temp/bin/python/samba/tests/samba_tool/ntacl.py", line 142, in test_set_expect_file_not_found
"No such file or directory expected")
AssertionError: 'No such file or directory' not found in "ERROR: Could not set acl for setExpectFileNotFound-
a94c241d9550d581e51d : [Errno 11] Resource temporarily unavailable: 'setExpectFileNotFound-
a94c241d9550d581e51d '\n" : No such file or directory expected
teardown_env(ad_dc)
This patch saves/sets errno explicitly before calling PyErr_SetFromErrno to
ensure the correct errno is used.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Apr 28 14:31:15 UTC 2025 on atb-devel-224
Stefan Metzmacher [Wed, 23 Apr 2025 08:58:55 +0000 (10:58 +0200)]
s3:rpc_server: make sure we can bind to the same port on all ip addresses
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15851
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Shweta Sodani [Fri, 14 Feb 2025 14:59:17 +0000 (20:29 +0530)]
vfs_ceph_new: Enhance logging for improved debugging and code flow visibility (part 2)
This commit introduces significant enhancements to our logging system to
improve debugging capabilities and provide better visibility into the
code's execution flow.
This is part 2 for logging improvement. There have already been some
logging improvements done in the past.
https://gitlab.com/samba-team/samba/-/merge_requests/3948
This commit includes following key changes.
Expanded a logging message
1) Every function entry and exit point.
2) Error Path / Error handling blocks.
3) Key decision branches (if/else statements).
Consistent logging.
1) Logging message to print either the file/dir name its
feasible.
2) Standardized log message formatting to ensure consistency and
readability. This makes it easier to scan and understand log
output.
Impact
This enhancement will reduce the time required to diagnose and resolve
issues. It will provide valuable insights into the system's behavior,
enabling us to optimize performance and improve user experience.
Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Apr 28 07:04:15 UTC 2025 on atb-devel-224
Pavel Filipenský [Wed, 23 Apr 2025 07:34:14 +0000 (09:34 +0200)]
lib/krb5_wrap: Fix placement of TALLOC_FREE(frame)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15727
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr 23 12:14:17 UTC 2025 on atb-devel-224
Stefan Metzmacher [Tue, 15 Apr 2025 11:48:54 +0000 (13:48 +0200)]
s3:lib: map EPROTONOSUPPORT to NT_STATUS_PROTOCOL_NOT_SUPPORTED
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Apr 18 11:18:42 UTC 2025 on atb-devel-224
Stefan Metzmacher [Tue, 15 Apr 2025 11:48:54 +0000 (13:48 +0200)]
libcli/util: map EPROTONOSUPPORT to NT_STATUS_PROTOCOL_NOT_SUPPORTED
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Wed, 9 Apr 2025 13:17:12 +0000 (15:17 +0200)]
s4:libcli: make use of smbsock_any_connect_send/recv()
This means have only one codepath that connects based
on struct smb_transports.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s3:libsmb: pass struct loadparm_context to smbsock_connect_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s3:libsmb: pass struct loadparm_context to smbsock_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s3:libsmb: pass struct loadparm_context to smbsock_any_connect_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s3:libsmb: pass struct loadparm_context to smbsock_any_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smbcli_sock_connect_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smb_composite_connect_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smb_composite_fetchfile_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 18:33:41 +0000 (20:33 +0200)]
s4:libcli: remove unused smb_composite_fetchfile()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smb_composite_fsinfo_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 18:28:39 +0000 (20:28 +0200)]
s4:libcli: remove unused smb_composite_fsinfo()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smb_composite_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smbcli_tree_full_connection()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smbcli_full_connection()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smbcli_sock_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smbcli_socket_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smb2_connect_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smb2_connect_ext()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)]
s4:libcli: pass struct loadparm_context to smb2_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 10 Apr 2025 14:04:47 +0000 (16:04 +0200)]
s4:libcli: pass struct loadparm_context to smb_connect_nego_send()
It will be passed further down in the next commits.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Tue, 8 Apr 2025 14:21:04 +0000 (16:21 +0200)]
s4:libcli: simplify struct smbcli_socket
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Wed, 9 Apr 2025 13:37:11 +0000 (15:37 +0200)]
s4:libcli: use the correct talloc parent for smbcli_socket->hostname
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Wed, 9 Apr 2025 14:54:36 +0000 (16:54 +0200)]
s3:libsmb: introduce smbsock_connect.h
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Tue, 8 Apr 2025 12:28:39 +0000 (14:28 +0200)]
s3:smbstatus: provide the transport type via json output
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Tue, 8 Apr 2025 12:20:36 +0000 (14:20 +0200)]
s3:smbd: store transport_type in smbXsrv_channel_global0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Tue, 8 Apr 2025 07:42:50 +0000 (09:42 +0200)]
s3:smbd: expand scope of lp_ctx variable in main()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Tue, 8 Apr 2025 07:45:12 +0000 (09:45 +0200)]
s4:ldap_server: make use of tstream_tls_params_server_lpcfg()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Mon, 7 Apr 2025 16:15:53 +0000 (18:15 +0200)]
s4:lib/tls: introduce tstream_tls_params_server_lpcfg()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
example/winexe: pass struct smb_transports through some more layers
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
example/fuse: pass struct smb_transports to connect_one()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to cli_full_connection_creds()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to cli_full_connection_creds_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 20:21:25 +0000 (22:21 +0200)]
s3:pylibsmb: add stackframe to py_cli_state_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to cli_cm_connect() and cli_cm_open()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to do_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to SMBC_server_internal()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:smbspool: pass struct smb_transports to smb_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:smbspool: pass struct smb_transports to smb_complete_connection()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to cli_start_connection()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to cli_start_connection_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to cli_connect_nb()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to cli_connect_nb_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to cli_connect_sock_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to smbsock_any_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 17:05:19 +0000 (19:05 +0200)]
s3:libsmb: pass struct smb_transports to smbsock_any_connect_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sat, 5 Apr 2025 15:50:16 +0000 (17:50 +0200)]
s3:libsmb: pass struct smb_transports to smbsock_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sat, 5 Apr 2025 15:50:16 +0000 (17:50 +0200)]
s3:libsmb: pass struct smb_transports to smbsock_connect_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Sun, 6 Apr 2025 19:05:12 +0000 (21:05 +0200)]
lib/util: fix NONNULL(params) __attribute__((nonnull(params)))
This should be set on the function prototype itself specifying
all non null arguments e.g.
NONNULL(1) NONNULL(3)
int foo(const char *arg1, int arg2, const char *arg3);
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Fri, 4 Apr 2025 15:04:50 +0000 (17:04 +0200)]
s3:libsmb: rework smbsock_connect_* to work on smb_transports internally
We try the first transport first and all others after 5msecs,
but if one fails we start the next one.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Fri, 4 Apr 2025 11:48:54 +0000 (13:48 +0200)]
s3:lib: remove unused open_socket_out_defer_send/recv
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Fri, 4 Apr 2025 11:33:31 +0000 (13:33 +0200)]
s3:lib: pass 'protocol' to open_socket_out_send()
For now this is always explicitly IPPROTO_TCP,
but that will change when we add support for IPPROTO_QUIC.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Fri, 4 Apr 2025 11:24:32 +0000 (13:24 +0200)]
s3:lib: let open_socket_out_send() use samba_sockaddr to avoid strict-aliasing warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Tue, 8 Apr 2025 09:16:10 +0000 (11:16 +0200)]
s3:smbd: use open_socket_in_protocol() in smbd_open_one_socket()
For now this is always explicitly IPPROTO_TCP,
but that will change when we add support for IPPROTO_QUIC.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 15:14:32 +0000 (17:14 +0200)]
s3:lib: split out open_socket_in_protocol()
This will be useful if we want to listen on IPPROTO_QUIC
sockets.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Wed, 2 Apr 2025 18:45:53 +0000 (20:45 +0200)]
docs-xml/smbdotconf: change 'smb ports' into a synonym for 'server smb transport'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 14:55:19 +0000 (16:55 +0200)]
ctdb:events: let 50.samba.script use 'server smb transports'
We can't only use 'server smb transports' as in ci runs
the 'testparm' binary is from the distribution and likely
be in older Samba version.
So we still fallback to 'smb ports'.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 14:55:19 +0000 (16:55 +0200)]
ctdb:events: let 50.samba.script normalize the transports to tcp ports
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 13:39:40 +0000 (15:39 +0200)]
s3:smbd: setup parent->transports from 'server smb transports'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 11:43:46 +0000 (13:43 +0200)]
s4:smb_server: make use of lpcfg_server_smb_transports() in smbsrv_add_socket()
Here we still only support tcp and nbt...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Wed, 2 Apr 2025 18:45:53 +0000 (20:45 +0200)]
docs-xml/smbdotconf: add 'server smb transport' option
In the next commits 'smb ports' will become just
a synonym for 'server smb transport'...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 13:02:57 +0000 (15:02 +0200)]
s4:torture: map --smb-ports option to 'client smb transports'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 10:26:48 +0000 (12:26 +0200)]
s4:param: let lpcfg_smbcli_options() use lpcfg_client_smb_transports()
It means we'll use 'client smb transports' instead of 'smb ports'
for the client side.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Wed, 2 Apr 2025 19:03:22 +0000 (21:03 +0200)]
docs-xml/smbdotconf: add 'client smb transports' option
This will replace the use of 'smb ports' for source4 clients.
In future it will be used for all smb client connections
and it will allow to add other transports as 'quic' or 'smbdirect.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 11:43:46 +0000 (13:43 +0200)]
s4:smb_server: make use of smb_transports_parse() in smbsrv_add_socket()
Here we will only support tcp and nbt...,
but that will simplify the global transition from 'smb ports' to
'server smb transports'.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 14:10:58 +0000 (16:10 +0200)]
s3:smbd: use parent->transports instead of 'smb ports' strings
This will simplify adding new transports as 'quic' or 'smbdirect'
in future.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 13:39:40 +0000 (15:39 +0200)]
s3:smbd: setup parent->transports from 'smb ports'
This will be used in the next commits and in the
end derived from the 'server smb transports' option.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 13:15:33 +0000 (15:15 +0200)]
s3:smbd: let open_sockets_smbd() use smbd_open_socket_for_ip()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 13:07:05 +0000 (15:07 +0200)]
s3:smbd: remove unused msg_ctx argument from smbd_open_socket_for_ip()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 12:47:13 +0000 (14:47 +0200)]
s3:smbd: let smbd_open_socket_for_ip() return the number of successful binds
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 12:42:44 +0000 (14:42 +0200)]
s3:smbd: simplify binding to wildcard addresses
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 12:37:02 +0000 (14:37 +0200)]
s3:smbd: only do dns_port logic in one central place.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 12:33:14 +0000 (14:33 +0200)]
s3:smbd: remove unused dns_port variable from smbd_open_socket_for_ip()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 13:23:48 +0000 (15:23 +0200)]
s3:smbd: let smbd_{addr_changed,close_socket_for_ip}() use samba_sockaddr to avoid strict-aliasing warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 11:50:47 +0000 (13:50 +0200)]
s3:smbd: let smbd_accept_connection() use samba_sockaddr to avoid strict-aliasing warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:56:13 +0000 (10:56 +0200)]
s4:client: remove unused ports from do_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:55:00 +0000 (10:55 +0200)]
s4:torture: remove unused ports from masktests.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:53:35 +0000 (10:53 +0200)]
s4:client: remove unused ports from cifsdd* functions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:49:30 +0000 (10:49 +0200)]
s4:libcli: remove unused ports from smbcli_full_connection()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:41:59 +0000 (10:41 +0200)]
s4:client: remove unused destports from do_message_op()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:40:51 +0000 (10:40 +0200)]
s4:libcli: remove unused ports from smbcli_socket_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:38:15 +0000 (10:38 +0200)]
s4:libcli: remove unused dest_ports from smbcli_tree_full_connection()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:35:05 +0000 (10:35 +0200)]
s4:libcli: remove unused dest_ports struct smb_composite_fsinfo
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:33:32 +0000 (10:33 +0200)]
s4:libcli: remove unused ports from struct smb_composite_fetchfile
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:31:05 +0000 (10:31 +0200)]
s4:torture/raw: remove unused dest_port handling from openbench.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Thu, 3 Apr 2025 08:28:26 +0000 (10:28 +0200)]
s4:libcli: remove unused dest_ports from struct smb_composite_connect
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>