rpms/xorg-x11-xdm/FC-5 xdm-1.0.1-setuid.patch, NONE, 1.1 xorg-x11-xdm.spec, 1.19, 1.20

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Jun 28 07:48:19 UTC 2006


Author: mharris

Update of /cvs/dist/rpms/xorg-x11-xdm/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv22608

Modified Files:
	xorg-x11-xdm.spec 
Added Files:
	xdm-1.0.1-setuid.patch 
Log Message:
* Wed Jun 28 2006 Mike A. Harris <mharris at redhat.com> 1:1.0.1-2
- Added xdm-1.0.1-setuid.patch to fix (#196126)
- Added various missing BuildRequires for (#191858)
- Added temporary "BuildRequires: autoconf, automake, libtool" dependencies
  for mock builds, for as long as we need to run autotools at compile time.
- Add missing documentation to doc macro, and move manpages from man1x to man1.
- Clean cruft out of specfile.


xdm-1.0.1-setuid.patch:
 session.c  |   10 ++++++++--
 xdmshell.c |    6 +++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

--- NEW FILE xdm-1.0.1-setuid.patch ---
Index: app/xdm/session.c
===================================================================
RCS file: /cvs/xorg/app/xdm/session.c,v
retrieving revision 1.3
diff -u -u -r1.3 session.c
--- app/xdm/session.c	8 Nov 2005 06:33:31 -0000	1.3
+++ app/xdm/session.c	20 Jun 2006 07:58:39 -0000
@@ -488,8 +488,14 @@
     else
 	ResetServer (d);
     if (removeAuth) {
-	setgid (verify.gid);
-	setuid (verify.uid);
+	if (setgid (verify.gid) == -1) {
+	    LogError( "SessionExit: setgid: %s\n", strerror(errno));
+	    exit(status);
+	}
+	if (setuid (verify.uid) == -1) {
+	    LogError( "SessionExit: setuid: %s\n", strerror(errno));
+	    exit(status);
+	}
 	RemoveUserAuthorization (d, &verify);
 #ifdef K5AUTH
 	/* do like "kdestroy" program */
Index: app/xdm/xdmshell.c
===================================================================
RCS file: /cvs/xorg/app/xdm/xdmshell.c,v
retrieving revision 1.3
diff -u -u -r1.3 xdmshell.c
--- app/xdm/xdmshell.c	14 Jul 2005 22:58:25 -0000	1.3
+++ app/xdm/xdmshell.c	20 Jun 2006 07:58:39 -0000
@@ -183,7 +183,11 @@
 #endif
 
     /* make xdm run in a non-setuid environment */
-    setuid (geteuid());
+    if (setuid (geteuid()) == -1) {
+	fprintf(stderr, "%s: cannot setuid (error %d, %s)\r\n",
+		ProgramName, errno, strerror(errno));
+	exit(1);
+    }
 
     /*
      * exec /usr/bin/X11/xdm -nodaemon -udpPort 0


Index: xorg-x11-xdm.spec
===================================================================
RCS file: /cvs/dist/rpms/xorg-x11-xdm/FC-5/xorg-x11-xdm.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- xorg-x11-xdm.spec	1 Mar 2006 07:06:02 -0000	1.19
+++ xorg-x11-xdm.spec	28 Jun 2006 07:48:16 -0000	1.20
@@ -1,33 +1,33 @@
-# FIXME:  The modular xdm package still needs a fair bit of work, most
-# of which probably needs to be done in the upstream CVS.  I've made
-# numerous FIXME comments throughout to document things I think need
-# to be done.  The spec file will naturally become less of a mess once
-# the upstream tarball is kosher.  -- mharris
-
 %define pkgname xdm
 
 Summary: X.Org X11 xdm - X Display Manager
 Name: xorg-x11-%{pkgname}
+Version: 1.0.1
+Release: 2
 # NOTE: Remove Epoch line if/when the package ever gets renamed.
 Epoch: 1
-Version: 1.0.1
-Release: 1.2
 License: MIT/X11
 Group: User Interface/X
 URL: http://www.x.org
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-Source0: http://xorg.freedesktop.org/releases/X11R7.0/src/everything/%{pkgname}-%{version}.tar.bz2
+Source0: http://xorg.freedesktop.org/releases/individual/app/%{pkgname}-%{version}.tar.bz2
 Source1: Xsetup_0
 Source10: xdm.init
 Source11: xdm.pamd
 Source13: xserver.pamd
 
+Patch0: xdm-1.0.1-setuid.patch
 # NOTE: Change xdm-config to invoke Xwilling with "-s /bin/bash" instead
 # of "-c" to fix bug (#86505)
 Patch10: xdm-1.0.1-redhat-xdm-config-fix.patch
 
+# FIXME: Temporary build dependencies for autotool dependence.
+BuildRequires: autoconf, automake, libtool
+
 BuildRequires: pkgconfig
+BuildRequires: xorg-x11-util-macros
+BuildRequires: xorg-x11-xtrans-devel
 BuildRequires: libXaw-devel
 BuildRequires: libXmu-devel
 BuildRequires: libXt-devel
@@ -45,6 +45,8 @@
 # FIXME: There's no autotool specified dep on this currently, but everything
 # explodes looking for X11/Xauth.h without it:
 BuildRequires: libXau-devel
+BuildRequires: libXinerama-devel
+BuildRequires: pam-devel
 
 Provides: %{pkgname}
 Obsoletes: XFree86-xdm
@@ -66,22 +68,12 @@
 
 %prep
 %setup -q -n %{pkgname}-%{version}
+%patch0 -p0 -b .setuid
 %patch10 -p0 -b .redhat-xdm-config-fix
 
 %build
 #cd 
 # FIXME: Work around pointer aliasing warnings from compiler for now
-# resource.c:213: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:215: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:219: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:223: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:227: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:229: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:235: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:242: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:251: warning: dereferencing type-punned pointer will break strict-aliasing rules
-# resource.c:253: warning: dereferencing type-punned pointer will break strict-aliasing rules
-
 export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
 # NOTE: We invoke aclocal/automake/autoconf to enable the changes present in
 # xdm-0.99.3-xdm-app-defaults-in-datadir.patch & xdm-0.99.3-xdm-configdir.patch
@@ -118,26 +110,12 @@
 # Explicitly create XDM authdir
 #mkdir -m 700 -p $RPM_BUILD_ROOT/var/lib/xdm/authdir
 
-# FIXME: Move manpages to correct man section and rename them.  This should
-# get submitted as a bug upstream for each of the 4 components.  Hmm, the
-# manpage(s) do not actually get installed.  Fix it and report it upstream.
-%if 1
-{
-   echo "FIXME: Upstream RC2 manpages install to incorrect location"
-   mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1x
-   for manpage in xdm ; do
-      mv $RPM_BUILD_ROOT%{_mandir}/man1/$manpage.* $RPM_BUILD_ROOT%{_mandir}/man1x/$manpage.1x
-   done
-   rmdir $RPM_BUILD_ROOT%{_mandir}/man1
-}
-%endif
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc
+%doc AUTHORS COPYING INSTALL NEWS README ChangeLog
 %{_bindir}/xdm
 %{_bindir}/xdmshell
 %dir %{_sysconfdir}/X11/xdm
@@ -171,16 +149,24 @@
 %{_libdir}/X11/xdm/chooser
 %{_libdir}/X11/xdm/libXdmGreet.so
 #%dir %{_mandir}/man1x
-%{_mandir}/man1x/*.1x*
+%{_mandir}/man1/*.1x*
 
 %changelog
+* Wed Jun 28 2006 Mike A. Harris <mharris at redhat.com> 1:1.0.1-2
+- Added xdm-1.0.1-setuid.patch to fix (#196126)
+- Added various missing BuildRequires for (#191858)
+- Added temporary "BuildRequires: autoconf, automake, libtool" dependencies
+  for mock builds, for as long as we need to run autotools at compile time.
+- Add missing documentation to doc macro, and move manpages from man1x to man1.
+- Clean cruft out of specfile.
+
 * Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> 1:1.0.1-1.2
 - bump again for double-long bug on ppc(64)
 
 * Tue Feb 07 2006 Jesse Keating <jkeating at redhat.com> 1:1.0.1-1.1
 - rebuilt for new gcc4.1 snapshot and glibc changes
 
-* Mon Jan  9 2006 Mike A. Harris <mharris at redhat.com> 1:1.0.1-1
+* Mon Jan 09 2006 Mike A. Harris <mharris at redhat.com> 1:1.0.1-1
 - Updated xdm to version 1.0.1 from X11R7.
 - Added --with-xdmscriptdir option to ./configure to put scripts in /etc
 - Updated xdm-1.0.1-redhat-xdm-config-fix.patch to work with xdm 1.0.1
@@ -222,11 +208,11 @@
 * Fri Nov 11 2005 Mike A. Harris <mharris at redhat.com> 1:0.99.3-1
 - Update xdm to 0.99.3 from X11R7 RC2.
 
-* Tue Nov 1 2005 Mike A. Harris <mharris at redhat.com> 1:0.99.2-1.20051031.3
+* Tue Nov 01 2005 Mike A. Harris <mharris at redhat.com> 1:0.99.2-1.20051031.3
 - Build with -fno-strict-aliasing to work around possible pointer aliasing
   issues
 
-* Tue Nov 1 2005 Mike A. Harris <mharris at redhat.com> 1:0.99.2-1.20051031.2
+* Tue Nov 01 2005 Mike A. Harris <mharris at redhat.com> 1:0.99.2-1.20051031.2
 - It is _sysconfdir not _sysconfigdir goofball!
 - Add {_sysconfdir}/pam.d/xdm and {_sysconfdir}/pam.d/xserver files that were
   missing from file manifest.
@@ -245,7 +231,7 @@
 - Add xdm-0.99.2-to-20051031.patch to pick up fixes from CVS head that allow
   us to set the config dir and other dirs.
 
-* Wed Oct  5 2005 Mike A. Harris <mharris at redhat.com> 6.99.99.0-2
+* Wed Oct 05 2005 Mike A. Harris <mharris at redhat.com> 6.99.99.0-2
 - Use Fedora-Extras style BuildRoot tag
 - Update BuildRequires to use new library package names
 




More information about the fedora-cvs-commits mailing list