neil / rpms / udisks2

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