rpcd: With npa->need_idle_server we can have more than 256 servers
authorVolker Lendecke <vl@samba.org>
Mon, 20 Feb 2023 17:46:50 +0000 (18:46 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 6 Mar 2023 22:35:00 +0000 (22:35 +0000)
Before this patch the worker-status cut the worker index such that
samba-dcerpcd could not properly update status of the surplus rpc
daemons. This could lead to those daemons to stay around forever,
samba-dcerpcd will never notice they are idle and can exit.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15310

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): Mon Mar  6 22:35:00 UTC 2023 on atb-devel-224

source3/librpc/idl/rpc_host.idl
source3/rpc_server/rpc_worker.c

index 899eabf3c2658425b6985368bf164d45b2c5f657..ddbd2781fe1332bc898451832b38988b1172ce05 100644 (file)
@@ -66,7 +66,7 @@ interface rpc_host_msg
                /**
                 * @brief Which of the processes of a helper prog is this from
                 */
-               uint8 worker_index;
+               uint32 worker_index;
 
                /**
                 * @brief How many clients this process serves right now
index 03ab974283385c8a28070719203c9191ab0f289c..e7112a9efc9d71edc27429fc076323b5324b700e 100644 (file)
@@ -93,7 +93,7 @@ static void rpc_worker_print_interface(
 
 static NTSTATUS rpc_worker_report_status(struct rpc_worker *worker)
 {
-       uint8_t buf[6];
+       uint8_t buf[9];
        DATA_BLOB blob = { .data = buf, .length = sizeof(buf), };
        enum ndr_err_code ndr_err;
        NTSTATUS status;