]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbind: Remove noisy error message in wb_open_internal_pipe()
authorSamuel Cabrero <scabrero@samba.org>
Mon, 1 Mar 2021 14:56:06 +0000 (15:56 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 6 Mar 2021 02:20:05 +0000 (02:20 +0000)
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 <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_cm.c
source3/winbindd/winbindd_samr.c

index 2029e4e8315aaa1dd460387d53db8a231bec1b12..431916a82a35e526cf51215460c92c9cb182893c 100644 (file)
@@ -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;
        }
 
index 5681a760bd1a3a37b5391cc374b9e0b853f89aa9..f5c748edff16d346b3b3564fa23250a1a3200a4a 100644 (file)
@@ -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;
        }