summaryrefslogtreecommitdiff
path: root/source4/samba
AgeCommit message (Collapse)AuthorFilesLines
2025-06-05s4:prefork: raise debug level of normal exitsDouglas Bagnall1-3/+6
REF: https://lists.samba.org/archive/samba/2025-February/250946.html Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-06-05s4:prefork: mention service name in exit messagesDouglas Bagnall1-6/+6
REF: https://lists.samba.org/archive/samba/2025-February/250946.html Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Rowland Penny <rpenny@samba.org>
2023-12-15VERSION: move COPYRIGHT_STARTUP_MESSAGE as SAMBA_COPYRIGHT_STRING into version.hStefan Metzmacher1-4/+4
We also prodive a samba_copyright_string() helper similar to samba_version_string(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15377 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Dec 15 10:44:42 UTC 2023 on atb-devel-224
2023-11-20s4/server.c: move some log messages from ERR to NOTICEBjörn Jacke1-2/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15377 Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-20logging: use DBG_STARTUP_NOTICE for startup messageBjörn Jacke1-4/+3
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15377 Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-24s4:service_named_pipe: make use of tstream_bsd_fail_readv_first_error(true)Stefan Metzmacher1-0/+2
This avoids doing useless work in case the client connection is already broken. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-11s4:samba: Fix code spellingJoseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-14s4:samba: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-08s4:samba: Add missing newline to logging messageJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-07-25s4:process_prefork: create new messaging context for the master processJule Anger1-1/+31
In order to allow the before_loop() hook to register messages or event handlers, we need to fix up task->event_ctx and create a new task->msg_ctx. It also means the struct task_server pointer changes in the master before_loop() hook. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-07-25s4:process: add method called before entering the tevent_loop_waitJule Anger4-0/+56
This gives the service a chance to register messaging and/or event handlers on the correct contexts. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-07-25s4:process_prefork: avoid memory leaks caused by messaging_post_selfJule Anger1-0/+13
Sending a message to a process with multiple tevent contexts can cause a message to get stuck and cause a data leak. In general it's safer to call imessaging_dgm_unref_ev() before talloc_free()... Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-14s4-server: Call dsdb_check_and_update_fl() during startup transaction.Andrew Bartlett1-2/+14
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-01-01Happy New Year 2023!Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Jan 1 00:24:02 UTC 2023 on sn-devel-184
2022-12-14s4/samba: use process_set_title()Ralph Boehme2-26/+8
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-09-16s4/server: stop suggesting ntvfs in error messageDouglas Bagnall1-2/+1
I am not sure about the rpc proxy. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-01-01Happy New Year 2022!Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jan 1 01:24:21 UTC 2022 on sn-devel-184
2021-12-10rpc_server: Check info5->transportVolker Lendecke1-0/+24
Eventually, this new mechanism might replace the ncalrpc_as_system mechanism: I think with this we're much more flexible and even more secure: We rely on the direct permissions on "np/" and don't have to pretend that the local client came from a file on /root. We are more flexible because with this mechanism we can easily fake arbitrary tokens and play with session keys. However, this would require that the source4 librpc code needs to learn about this mechanism, which I was not able to complete. The source3 rpc_server side of this will go away soon, so for now only allow NCACN_NP there. The check in source4 will stay with us for a while, so allow NCACN_NP and NCALRPC to be set remotely here. With NCACN_NP (the case for a client to connect on a named pipe), protect against accidentially connecting as system. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-10librpc: Get transport out of tstream_npa_accept_existing_recv()Volker Lendecke1-0/+2
To be used by the RPC servers in the next commit Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-11-30s4:samba: split out a samba_service_init() helper functionStefan Metzmacher3-11/+27
The loading function should be in the same SAMBA_LIBRARY() as the modules. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Nov 30 16:44:57 UTC 2021 on sn-devel-184
2021-10-08samba: Save a line with TALLOC_FREEVolker Lendecke1-2/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-10-02s4: process_prefork: Make prefork_restart() use an asynchronous timer event ↵Jeremy Allison1-16/+62
instead of calling sleep(X). This should prevent any long pauses in the calling process, as we get a callback for the restart after X seconds. To make the code flow more understandable, always go through a timer event even if the wait time is zero. This has the same effect as an immediate event as it will call the callback function as soon as we go back into the event loop. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Oct 2 01:38:43 UTC 2021 on sn-devel-184
2021-09-06s4/samba: POPT_COMMON_DAEMONRalph Boehme1-68/+20
Note: this also changes logging to go to stderr instead of stdout which is the same behaviour as smbd, nmbd and winbindd (starting with 4.15). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14803 RN: smbd/winbindd started in daemon mode generate output on stderr/stdout Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Sep 6 14:23:15 UTC 2021 on sn-devel-184
2021-04-29s4:samba: Migrate samba daemon to new cmdline option parserAndreas Schneider2-24/+58
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-29s4:samba: Pass a talloc memory context to binary_smbd_main()Andreas Schneider1-9/+21
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-01tstream_npa: Return named_pipe_auth_req_info4 from accept_existingVolker Lendecke1-0/+1
Callers might want the full picture. We need to make named_pipe_auth_req_info4 public for that. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-09samba: Fix indentationVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-01Happy New Year 2021!Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jan 1 11:56:23 UTC 2021 on sn-devel-184
2020-12-07s4/samba: call force_check_log_size() in standard_new_task()Ralph Boehme1-0/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 RN: samba process does not honor max log size Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Dec 7 18:54:29 UTC 2020 on sn-devel-184
2020-12-07s4/samba: call force_check_log_size() in standard_accept_connection()Ralph Boehme1-0/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-07s4/samba: call force_check_log_size() in prefork_reload_after_fork()Ralph Boehme1-0/+1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme <slow@samba.org>
2020-12-07s4: call reopen_logs_internal() in the SIGHUP handler of the prefork process ↵Ralph Boehme1-1/+1
model With debug_schedule_reopen_logs() the actual reopen only takes place at some point in the future when a DEBUG message is processed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-07s4: replace low-level SIGUP handler with a tevent handlerRalph Boehme1-0/+29
Replace the low-level signal handler for SIGHUP with a nice tevent signal handler. The low-level handler sig_hup() installed by setup_signals() remains being used during early startup before a tevent context is available. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-07s4: install tevent tracing hooks to trigger logfile rotationRalph Boehme3-2/+33
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-07s4: add samba server tevent trace helper stuffRalph Boehme3-0/+131
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-11-27s4: rename source4/smbd/ to source4/samba/Ralph Boehme14-0/+3970
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Nov 27 10:07:18 UTC 2020 on sn-devel-184