diff --git a/xinit-1.3.4-set-XORG_RUN_AS_USER_OK.patch b/xinit-1.3.4-set-XORG_RUN_AS_USER_OK.patch new file mode 100644 index 0000000..25ac9f7 --- /dev/null +++ b/xinit-1.3.4-set-XORG_RUN_AS_USER_OK.patch @@ -0,0 +1,12 @@ +diff -up xinit-1.3.4/startx.cpp~ xinit-1.3.4/startx.cpp +--- xinit-1.3.4/startx.cpp~ 2015-03-18 12:13:11.000000000 +0100 ++++ xinit-1.3.4/startx.cpp 2015-03-18 12:49:49.445624223 +0100 +@@ -199,6 +199,8 @@ if [ x"$server" = x ]; then + if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then + tty_num=$(echo "$tty" | grep -oE '[0-9]+$') + vtarg="vt$tty_num -keeptty" ++ XCOMM Fedora specific mod to make X run as non root ++ export XORG_RUN_AS_USER_OK=1 + fi + #endif + diff --git a/xorg-x11-xinit.spec b/xorg-x11-xinit.spec index b8a2c17..a201d07 100644 --- a/xorg-x11-xinit.spec +++ b/xorg-x11-xinit.spec @@ -3,7 +3,7 @@ Summary: X.Org X11 X Window System xinit startup scripts Name: xorg-x11-%{pkgname} Version: 1.3.4 -Release: 5%{?dist} +Release: 6%{?dist} License: MIT URL: http://www.x.org @@ -27,6 +27,8 @@ Patch1: xinit-1.0.2-client-session.patch Patch2: 0001-startx-Pass-nolisten-tcp-by-default.patch # submitted upstream, rhbz#1177513 Patch3: 0001-startx-Pass-keeptty-when-telling-the-server-to-start.patch +# Fedora specific patch to match the similar patch in the xserver +Patch4: xinit-1.3.4-set-XORG_RUN_AS_USER_OK.patch BuildRequires: pkgconfig(x11) BuildRequires: dbus-devel @@ -55,6 +57,7 @@ managers. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build %configure @@ -108,6 +111,10 @@ install -p -m644 -D %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/xsessions/xinit-compa %{_datadir}/xsessions/xinit-compat.desktop %changelog +* Wed Mar 18 2015 Hans de Goede - 1.3.4-6 +- Set XORG_RUN_AS_USER_OK when starting X on the current tty, to run X + to run without root rights when possible + * Sat Feb 21 2015 Till Maas - 1.3.4-5 - Rebuilt for Fedora 23 Change https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code