From: Stefan Metzmacher Date: Sat, 14 Sep 2024 16:54:43 +0000 (+0200) Subject: s3:winbindd: cm_connect_lsa_tcp() doesn't need to check for NCACN_IP_TCP or LEVEL_INT... X-Git-Tag: samba-4.21.7~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3db4cfe8a33ddc23557905fad85d72067dcb1ac0;p=thirdparty%2Fsamba.git s3:winbindd: cm_connect_lsa_tcp() doesn't need to check for NCACN_IP_TCP or LEVEL_INTEGRITY We only ever create domain->lsa_pipe_tcp with cli_rpc_pipe_open_schannel_with_creds() and hardcoded NCACN_IP_TCP. And schannel_update_internal returns an error with an auth level lower than DCERPC_AUTH_LEVEL_INTEGRITY. Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Reviewed-by: Ralph Boehme (cherry picked from commit 61d38f70be378c59b42a6e20e7d49fea21255c6b) --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index f33e0bcb165..9d59876970a 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2876,9 +2876,7 @@ static NTSTATUS cm_connect_lsa_tcp(struct winbindd_domain *domain, /* * rpccli_is_connected handles more error cases */ - if (rpccli_is_connected(conn->lsa_pipe_tcp) && - conn->lsa_pipe_tcp->transport->transport == NCACN_IP_TCP && - conn->lsa_pipe_tcp->auth->auth_level >= DCERPC_AUTH_LEVEL_INTEGRITY) { + if (rpccli_is_connected(conn->lsa_pipe_tcp)) { goto done; }