]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:rpcclient: make use of dcerpc_binding_handle_auth_info()
authorStefan Metzmacher <metze@samba.org>
Sat, 14 Sep 2024 14:46:47 +0000 (16:46 +0200)
committerJule Anger <janger@samba.org>
Thu, 12 Jun 2025 11:27:15 +0000 (11:27 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 8dcbbebe56d3dad3650eca79322150e9d397e227)

source3/rpcclient/rpcclient.c

index eed8e4654f2414fdf2c3ad87d196e059855731ee..6df33e04278c41497fa9976a87d641825a1002d8 100644 (file)
@@ -362,16 +362,23 @@ static NTSTATUS cmd_set_ss_level(struct dcerpc_binding *binding)
                struct cmd_set *tmp_set;
 
                for (tmp_set = tmp->cmd_set; tmp_set->name; tmp_set++) {
+                       struct dcerpc_binding_handle *tmp_b = NULL;
+                       enum dcerpc_AuthType tmp_auth_type;
+                       enum dcerpc_AuthLevel tmp_auth_level;
+
                        if (tmp_set->rpc_pipe == NULL) {
                                continue;
                        }
 
-                       if ((tmp_set->rpc_pipe->auth->auth_type
-                            != auth_type)
-                           || (tmp_set->rpc_pipe->auth->auth_level
-                               != auth_level)) {
+                       tmp_b = tmp_set->rpc_pipe->binding_handle;
+                       dcerpc_binding_handle_auth_info(tmp_b,
+                                                       &tmp_auth_type,
+                                                       &tmp_auth_level);
+
+                       if (tmp_auth_type != auth_type ||
+                           tmp_auth_level != auth_level)
+                       {
                                TALLOC_FREE(tmp_set->rpc_pipe);
-                               tmp_set->rpc_pipe = NULL;
                        }
                }
        }