From beb58c56fe6b92c9fdb67035367123dcbdf92cfa Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Thu, 9 Oct 2025 15:44:10 +0200 Subject: [PATCH] Resolves: RHEL-118549 - Do not clear DISPLAY unconditionally --- rsync-3.4.1-ssh-askpass.patch | 15 +++++++++++++++ rsync.spec | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 rsync-3.4.1-ssh-askpass.patch diff --git a/rsync-3.4.1-ssh-askpass.patch b/rsync-3.4.1-ssh-askpass.patch new file mode 100644 index 0000000..8941495 --- /dev/null +++ b/rsync-3.4.1-ssh-askpass.patch @@ -0,0 +1,15 @@ +diff --git a/main.c b/main.c +index 7222a83..630ca03 100644 +--- a/main.c ++++ b/main.c +@@ -1743,7 +1743,9 @@ int main(int argc,char *argv[]) + our_gid = MY_GID(); + am_root = our_uid == ROOT_UID; + +- unset_env_var("DISPLAY"); ++ // DISPLAY should only be cleared if SSH_ASKPASS is empty ++ if (!getenv("SSH_ASKPASS")) ++ unset_env_var("DISPLAY"); + + #if defined USE_OPENSSL && defined SET_OPENSSL_CONF + #define TO_STR2(x) #x diff --git a/rsync.spec b/rsync.spec index 8ca039d..e99cc11 100644 --- a/rsync.spec +++ b/rsync.spec @@ -9,7 +9,7 @@ Summary: A program for synchronizing files over a network Name: rsync Version: 3.4.1 -Release: 2%{?prerelease}%{?dist} +Release: 3%{?prerelease}%{?dist} URL: https://rsync.samba.org/ Source0: https://download.samba.org/pub/rsync/src/rsync-%{version}%{?prerelease}.tar.gz @@ -45,6 +45,7 @@ License: GPL-3.0-or-later Patch1: rsync-3.2.2-runtests.patch # creating rrsync.1.md would require commonmark, we copy it instead Patch2: rsync-3.4.1-rrsync-man.patch +Patch3: rsync-3.4.1-ssh-askpass.patch %description Rsync uses a reliable algorithm to bring remote and host files into @@ -86,6 +87,7 @@ may be used to setup a restricted rsync users via ssh logins. %patch 1 -p1 -b .runtests %patch 2 -p1 -b .rrsync +%patch 3 -p1 -b .ssh-askpass %build %configure \ @@ -143,6 +145,9 @@ install -D -m644 %{SOURCE6} $RPM_BUILD_ROOT/%{_unitdir}/rsyncd@.service %systemd_postun_with_restart rsyncd.service %changelog +* Thu Oct 09 2025 Michal Ruprich - 3.4.1-3 +- Resolves: RHEL-118549 - Do not clear DISPLAY unconditionally + * Thu Jan 30 2025 Michal Ruprich - 3.4.1-2 - Resolves: RHEL-71293 - Build rsync with --with-rrsync