Resolves: RHEL-118549 - Do not clear DISPLAY unconditionally

This commit is contained in:
Michal Ruprich 2025-10-09 15:44:10 +02:00
parent 2f3e2240f0
commit beb58c56fe
2 changed files with 21 additions and 1 deletions

View File

@ -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

View File

@ -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 <mruprich@redhat.com> - 3.4.1-3
- Resolves: RHEL-118549 - Do not clear DISPLAY unconditionally
* Thu Jan 30 2025 Michal Ruprich <mruprich@redhat.com> - 3.4.1-2
- Resolves: RHEL-71293 - Build rsync with --with-rrsync