]> git.ipfire.org Git - thirdparty/samba.git/commit
smbd: improve reinit_after_fork error handling
authorDavid Disseldorp <ddiss@samba.org>
Wed, 4 Sep 2024 02:54:09 +0000 (02:54 +0000)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 4 Sep 2024 09:53:01 +0000 (09:53 +0000)
commit22edd69503fc5985cd85160ddae7b57e64296a1e
tree0434a604a00c06fbea28112957a12688055732c5
parentecb8a99a2c7ba36f9adc50ef13cd8465a0c49b19
smbd: improve reinit_after_fork error handling

reinit_after_fork() may panic or return an error on failure. When smbd
is started in interactive mode, it ignores the reinit_after_fork()
return status and unconditionally proceeds to smbd_process().

Similarly, if messaging_reinit() fails within reinit_after_fork() then
it will subsequently call ctdb_async_ctx_reinit() if clustering is
enabled.

There's no reason why these errors shouldn't be handled immediately, so
add appropriate error handling.

Found by code inspection; not seen in the wild.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Sep  4 09:53:01 UTC 2024 on atb-devel-224
source3/lib/util.c
source3/smbd/server.c