* Wed Oct 19 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-5

- Fix iscsi authentication info override (#1983602)

Resolves: #1983602
This commit is contained in:
Tomas Bzatek 2022-10-19 14:05:29 +02:00
parent 63ea2b4d1f
commit e52ee73196
2 changed files with 35 additions and 1 deletions

View File

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

View File

@ -48,7 +48,7 @@
Name: udisks2
Summary: Disk Manager
Version: 2.9.4
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2+
URL: https://github.com/storaged-project/udisks
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
@ -61,6 +61,8 @@ Patch2: udisks-2.10.0-lvm2_teardown_tests.patch
Patch3: udisks-2.10.0-vdo_test_writeAmplificationRatio.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2120329
Patch4: udisks-2.10.0-block_format_ata_secure_erase.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1983602
Patch5: udisks-2.10.0-iscsi-auth-info.patch
BuildRequires: make
BuildRequires: glib2-devel >= %{glib2_version}
@ -436,6 +438,9 @@ fi
%endif
%changelog
* Wed Oct 19 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-5
- Fix iscsi authentication info override (#1983602)
* Fri Sep 16 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-4
- Restrict ATA Secure Erase Format() options (#2120329)