neil / rpms / udisks2

Forked from rpms/udisks2 a year ago
Clone
8c4b62
From 9a6e6b700b19539465ab6b241f04b94d4b3769c4 Mon Sep 17 00:00:00 2001
8c4b62
From: Tomas Bzatek <tbzatek@redhat.com>
8c4b62
Date: Mon, 10 Oct 2022 13:55:29 +0200
8c4b62
Subject: [PATCH] iscsi: Always set auth info
8c4b62
8c4b62
In case of reusing a context auth info needs to be
8c4b62
always set to override previous data.
8c4b62
---
8c4b62
 modules/iscsi/udisksiscsiutil.c | 7 ++-----
8c4b62
 1 file changed, 2 insertions(+), 5 deletions(-)
8c4b62
8c4b62
diff --git a/modules/iscsi/udisksiscsiutil.c b/modules/iscsi/udisksiscsiutil.c
8c4b62
index 8fdae889c7..78890106f0 100644
8c4b62
--- a/modules/iscsi/udisksiscsiutil.c
8c4b62
+++ b/modules/iscsi/udisksiscsiutil.c
8c4b62
@@ -171,11 +171,8 @@ iscsi_perform_login_action (UDisksLinuxModuleISCSI     *module,
8c4b62
   /* Get a libiscsi context. */
8c4b62
   ctx = udisks_linux_module_iscsi_get_libiscsi_context (module);
8c4b62
 
8c4b62
-  if (action == ACTION_LOGIN &&
8c4b62
-      auth_info && auth_info->method == libiscsi_auth_chap)
8c4b62
-    {
8c4b62
-      libiscsi_node_set_auth (ctx, node, auth_info);
8c4b62
-    }
8c4b62
+  if (action == ACTION_LOGIN && auth_info)
8c4b62
+    libiscsi_node_set_auth (ctx, node, auth_info);
8c4b62
 
8c4b62
   /* Login or Logout */
8c4b62
   err = action == ACTION_LOGIN ?