neil / rpms / udisks2

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