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