From bc87b470c2ff8ed3ed708ea74e9745cd62d4c53e Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 11 Feb 2007 08:30:30 +0100 Subject: [PATCH] Update patch 14_SECURITY_setuid.diff. Parts of patch 14_SECURITY_setuid.diff applying to xf86dga and xinit are now included upstream. --- debian/changelog | 4 ++- debian/patches/14_SECURITY_setuid.diff | 40 -------------------------- 2 files changed, 3 insertions(+), 41 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4baa7f0..a7c0a44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,10 @@ xbase-clients (1:7.2.ds1-1) UNRELEASED; urgency=low * Update to xedit 1.0.2. * Update to xev 1.0.2. * Update to xf86dga 1.0.2. + + relevant part dropped from 14_SECURITY_setuid.diff. * Update to xfontsel 1.0.2. * Update to xinit 1.0.3. + + relevant part dropped from 14_SECURITY_setuid.diff. * Update to xkbcomp 1.0.3. * Update to xlsfonts 1.0.2. * Update to xmodmap 1.0.2. @@ -26,7 +28,7 @@ xbase-clients (1:7.2.ds1-1) UNRELEASED; urgency=low apply to xprop, xwd and xwininfo as well, since they all use a copy of dsimple.c. - -- Julien Cristau Sun, 11 Feb 2007 08:17:47 +0100 + -- Julien Cristau Sun, 11 Feb 2007 08:27:31 +0100 xbase-clients (1:7.1.ds1-2) unstable; urgency=low diff --git a/debian/patches/14_SECURITY_setuid.diff b/debian/patches/14_SECURITY_setuid.diff index c4eeb67..1b12381 100644 --- a/debian/patches/14_SECURITY_setuid.diff +++ b/debian/patches/14_SECURITY_setuid.diff @@ -1,43 +1,3 @@ -Index: xbase-clients/xf86dga/dga.c -=================================================================== ---- xbase-clients.orig/xf86dga/dga.c 2006-06-30 01:06:00.000000000 -0400 -+++ xbase-clients/xf86dga/dga.c 2006-06-30 01:06:50.000000000 -0400 -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -141,7 +142,10 @@ - - #ifndef __UNIXOS2__ - /* Give up root privs */ -- setuid(getuid()); -+ if (setuid(getuid()) == -1) { -+ fprintf(stderr, "Unable to change uid: %s\n", strerror(errno)); -+ exit(2); -+ } - #endif - - XF86DGASetViewPort(dis, DefaultScreen(dis), 0, 0); -Index: xbase-clients/xinit/xinit.c -=================================================================== ---- xbase-clients.orig/xinit/xinit.c 2006-06-30 01:07:11.000000000 -0400 -+++ xbase-clients/xinit/xinit.c 2006-06-30 01:07:49.000000000 -0400 -@@ -692,7 +692,10 @@ - startClient(char *client[]) - { - if ((clientpid = vfork()) == 0) { -- setuid(getuid()); -+ if (setuid(getuid()) == -1) { -+ Error("cannot change uid: %s\n", strerror(errno)); -+ _exit(ERR_EXIT); -+ } - setpgrp(0, getpid()); - environ = newenviron; - #ifdef __UNIXOS2__ Index: xbase-clients/xload/xload.c =================================================================== --- xbase-clients.orig/xload/xload.c 2006-06-30 01:08:01.000000000 -0400