From: Samuel Cabrero Date: Mon, 1 Mar 2021 14:56:06 +0000 (+0100) Subject: winbind: Remove noisy error message in wb_open_internal_pipe() X-Git-Tag: tevent-0.11.0~1682 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fe7536145dc2c29ec71f6077188d74f4e08abd6;p=thirdparty%2Fsamba.git winbind: Remove noisy error message in wb_open_internal_pipe() Before merging the s4 and s3 RPC servers the make_internal_rpc_pipe_p() function did not fail when the requested interface was not registered in the calling process because it did not check the return value of rpc_srv_get_pipe_cmds(). If the interface was not registed, the pointer to the interface functions was NULL and later, when dispatching a call, rpcint_dispatch() returned NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE in this case. After merging the RPC servers, the rpc_pipe_open_internal() function will return NT_STATUS_RPC_INTERFACE_NOT_FOUND if the interface is not registered in the calling process. This causes a noisy error message in winbind when it tries to open the dssetup pipe to the primary domain and it is not an AD domain. The callers of wb_open_internal_pipe() when connecting to the domain already logs the error at level greather or equal to five. This commit moves the dupplicated and noisy error message at level zero from wb_open_internal_pipe() to its callers outside winbindd_cm.c. This error can be seen in winbindd logs of ad_member and nt4_member test environments. [2021/03/01 16:49:38.486004, 0, pid=12456] ../../source3/winbindd/winbindd_cm.c:1893(wb_open_internal_pipe) open_internal_pipe: Could not connect to dssetup pipe: NT_STATUS_RPC_INTERFACE_NOT_FOUND Signed-off-by: Samuel Cabrero Reviewed-by: Jeremy Allison --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 2029e4e8315..431916a82a3 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1890,8 +1890,6 @@ NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx, &cli); } if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("open_internal_pipe: Could not connect to %s pipe: %s\n", - table->name, nt_errstr(status))); return status; } diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c index 5681a760bd1..f5c748edff1 100644 --- a/source3/winbindd/winbindd_samr.c +++ b/source3/winbindd/winbindd_samr.c @@ -66,6 +66,8 @@ NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx, status = wb_open_internal_pipe(mem_ctx, &ndr_table_samr, samr_pipe); if (!NT_STATUS_IS_OK(status)) { + DBG_ERR("Could not connect to %s pipe: %s\n", + ndr_table_samr.name, nt_errstr(status)); return status; } @@ -104,6 +106,8 @@ NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx, status = wb_open_internal_pipe(mem_ctx, &ndr_table_lsarpc, lsa_pipe); if (!NT_STATUS_IS_OK(status)) { + DBG_ERR("Could not connect to %s pipe: %s\n", + ndr_table_lsarpc.name, nt_errstr(status)); return status; }