script/autobuild.py: add some --private-libraries=ALL testing BUG: https://bugzilla.samba.org/show_bug.cgi?id=15545 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jan 4 12:45:58 UTC 2024 on atb-devel-224
wafsamba: fix the usage of --private-extension-exception It was completely unused... BUG: https://bugzilla.samba.org/show_bug.cgi?id=15545 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
wscript: use opt.PRIVATE_EXTENSION_DEFAULT('private-samba') The problem was that we used opt.PRIVATE_EXTENSION_DEFAULT('samba4') and libndr as private will become libndr-samba4 and that already exists as libndr-samba4 as we don't append the extension if it's already there. So meant with --private-libraries=ALL we hit the following problem: $ ./configure --private-libraries=ALL $ make smbd/smbd Waf: Leaving directory `/samba/bin/default' Task dependency cycle in "run_after" constraints: {task ...: cshlib dcerpc-samba4.empty.c.12.o,ndr_winbind_c.c.229.o -> libdcerpc-samba4.so} make: *** [Makefile:131: smbd/smbd] Error 1 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15545 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
script/autobuild.py: nonshared-test works now I guess the problem was related to wrapper libraries... BUG: https://bugzilla.samba.org/show_bug.cgi?id=15545 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
third_party/*_wrapper: use SAMBA_LIBRARY(force_unversioned=True) This prevents --private-libraries=ALL from creating unuseable wrapper libraries, as they can't work with symbol versioning. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15545 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
wafsamba: introduce SAMBA_LIBRARY(force_unversioned=False) This can be used in order to avoid a library to be catched by --private-libraries=ALL. It is needed for our wrapper libraries. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15545 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
s3:smbd multichannel: always refresh the network information To maintain SMB Multichannel, windows client might periodically query with FSCTL_QUERY_NETWORK_INTERFACE_INFO to get SMB server's network information, in my case windows server 2022 would do this every 10 minutes (600 seconds). Consider a scenario: the network information might have changed between these queries, some become link down, new interface is link up, network speed is changed, and etc. So far smbd might not aware of these changes and still report out-of-date network information to windows client, until we manually send a SIGHUP to smbd in order to trigger load_interfaces(): smbd_sig_hup_handler() > reload_services () > load_interfaces() This might be a bit inconvenient because it is hard to decide when should we manually send a SIGHUP to smbd for refreshing network information. This patch adds load_interfaces() at fsctl_network_iface_info(), while smbd received FSCTL_QUERY_NETWORK_INTERFACE_INFO would go through this and refresh local_interfaces, then respond to client with up-to-date network information; also refresh num_ifaces to make sure interfaces count is consistent. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15547 Signed-off-by: Jones Syue <jonessyue@qnap.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org>
ctdb: add comments to "addip"/"delip" when CTDB_{CONTROL,EVENT,SRVID}_IPREALLOCATED happens "addip"/"delip" are different from "moveip" so they don't need to call ipreallocate() nor send_ipreallocated_control_to_nodes(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb: let "moveip" end with CTDB_CONTROL_IPREALLOCATED to all connected nodes This matches the behavior of takeover_send/recv() from ctdb_takeover_helper.c. It means we consistently call the ipreallocated event scripts and also send CTDB_SRVID_IPREALLOCATED after moving ips. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb: let "moveip" also use disable_takeover_runs() That makes the behavior more consistent compared to a takeover run started from the within ctdbd. The behavior is the same but ctdb_message_disable_ip_check() used a legacy code path and the next commits will also touch some of the moveip logic... The logic and comments are copied from control_reloadips(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb: send a CTDB_SRVID_IPREALLOCATED message after CTDB_EVENT_IPREALLOCATED Event scripts run the "ipreallocated" hook in order to notice that some ip addresses in the cluster potentially changed. CTDB_SRVID_IPREALLOCATED gives C code a chance to get notified as well once the event scripts are finished. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
s3:utils: Fix the auth function to print correct values to the user In order to show correct values in the password prompt displayed by cli_credentials_get_password*(). We need to set the domain and username in the credentials system. The credentials supplied via the SMB URL have a higher priority than the command line options. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15538 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jan 4 11:26:52 UTC 2024 on atb-devel-224
s3:utils: Handle the domain before username and password The cli_credentials_get_password*() function will interactively ask the user for a password if none has been supplied via another ways. To show the correct domain and username in the prompt, we need handle domain and user first. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15538 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
smbd: Fix traversing snapshot dirs that vanished in current fileset Bug: https://bugzilla.samba.org/show_bug.cgi?id=15544 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): Tue Jan 2 20:37:01 UTC 2024 on atb-devel-224
shadow_copy: Add test for missing directory in "current" fileset Right now we can't traverse a subdirectory in a snapshot which was deleted in the current set of files. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15544 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>