neil / rpms / udisks2

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