diff --git a/SOURCES/ssh-x-forwarding.csh b/SOURCES/ssh-x-forwarding.csh new file mode 100644 index 0000000..393a36c --- /dev/null +++ b/SOURCES/ssh-x-forwarding.csh @@ -0,0 +1,6 @@ +# DBus session bus over SSH with X11 forwarding +if ( $?SSH_CONNECTION == 0 ) exit +if ( $?DISPLAY == 0 ) exit +if ( $SHLVL > 1 ) exit +setenv GDK_BACKEND x11 +eval `dbus-launch --auto-syntax --exit-with-x11` diff --git a/SOURCES/ssh-x-forwarding.sh b/SOURCES/ssh-x-forwarding.sh new file mode 100644 index 0000000..62ce53b --- /dev/null +++ b/SOURCES/ssh-x-forwarding.sh @@ -0,0 +1,7 @@ +# DBus session bus over SSH with X11 forwarding +[ -z "$SSH_CONNECTION" ] && return +[ -z "$DISPLAY" ] && return +[ "$SHLVL" -gt 1 ] && return + +GDK_BACKEND=x11; export GDK_BACKEND +eval $(dbus-launch --sh-syntax --exit-with-session) diff --git a/SPECS/dbus.spec b/SPECS/dbus.spec index d6c8268..ddd4ae8 100644 --- a/SPECS/dbus.spec +++ b/SPECS/dbus.spec @@ -19,7 +19,7 @@ Name: dbus Epoch: 1 Version: 1.12.8 -Release: 11%{?dist} +Release: 12%{?dist} Summary: D-BUS message bus Group: System Environment/Libraries @@ -30,6 +30,8 @@ URL: http://www.freedesktop.org/Software/dbus/ #VCS: git:git://git.freedesktop.org/git/dbus/dbus Source0: https://dbus.freedesktop.org/releases/%{name}/%{name}-%{version}.tar.gz Source1: 00-start-message-bus.sh +Source2: ssh-x-forwarding.csh +Source3: ssh-x-forwarding.sh Patch0: 0001-tools-Use-Python3-for-GetAllMatchRules.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1725570 Patch1: dbus-1.12.8-fix-CVE-2019-12749.patch @@ -201,6 +203,8 @@ rm -rf %{buildroot}%{_libdir}/cmake %endif install -Dp -m755 %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/00-start-message-bus.sh +install -Dp -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/ssh-x-forwarding.csh +install -p -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/ # Obsolete, but still widely used, for drop-in configuration snippets. install --directory %{buildroot}%{_sysconfdir}/dbus-1/session.d @@ -384,6 +388,7 @@ popd %files x11 %{_bindir}/dbus-launch %{_mandir}/man1/dbus-launch.1* +%{_sysconfdir}/profile.d/ssh-x-forwarding.* %{_sysconfdir}/X11/xinit/xinitrc.d/00-start-message-bus.sh %files devel @@ -399,6 +404,9 @@ popd %changelog +* Thu Jan 14 2021 David King - 1:1.12.8-12 +- Install X11 SSH forwarding snippets (#1916124) + * Tue Jun 30 2020 David King - 1:1.12.8-11 - Fix CVE-2020-12049 (#1851997)