[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#413454: marked as done (xorg: allow GNU/kFreeBSD console users to start X)

Your message dated Sun, 15 Apr 2007 16:02:04 +0000
with message-id <E1Hd7Ay-0003Lt-Tx@ries.debian.org>
and subject line Bug#413454: fixed in xorg 1:7.2-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xorg
Version: 1:7.1.0-13
Severity: wishlist
Tags: patch
User: glibc-bsd-devel@lists.alioth.debian.org
Usertags: kfreebsd


Currently on Debian GNU/kFreeBSD systems a user cannot start X using
the wrapper w/o being root, or changing in Xwrapper.config allowed_users
to anybody (which is a security threat).

The attached patch adds console detection support, and some messages
at build and run time to allow the user to know what failed on
unsupported systems.

diff -Nru xorg-7.1.0/debian/local/xserver-wrapper.c xorg-7.1.0/debian/local/xserver-wrapper.c
--- xorg-7.1.0/debian/local/xserver-wrapper.c	2007-02-13 12:02:09.000000000 +0200
+++ xorg-7.1.0/debian/local/xserver-wrapper.c	2007-03-05 07:05:32.000000000 +0200
@@ -102,7 +102,12 @@
 # include <sys/resource.h>
+#if defined(__linux__)
 #define VT_MAJOR_DEV 4
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <sys/consio.h>
 #define X_WRAPPER_CONFIG_FILE "/etc/X11/Xwrapper.config"
 #define X_SERVER_SYMLINK_DIR "/etc/X11"
 #define X_SERVER_SYMLINK "/etc/X11/X"
@@ -138,10 +143,37 @@
 static int
-checkSecLevel(SecurityLevel level)
+#if defined(__linux__)
   struct stat s;
+  /* see if stdin is a virtual console device */
+  if (fstat(0, &s) != 0) {
+    (void) fprintf(stderr, "X: cannot stat stdin\n");
+    return FALSE;
+  }
+  if (S_ISCHR(s.st_mode) &&
+      ((s.st_rdev >> 8) & 0xff) == VT_MAJOR_DEV &&
+      (s.st_rdev & 0xff) < 64) {
+    return TRUE;
+  }
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+  int idx;
+  if (ioctl(0, VT_GETINDEX, &idx) != -1)
+    return TRUE;
+#warning This program needs porting to your kernel.
+  (void) fprintf(stderr, "X: unable to determine if running on a console\n");
+  return FALSE;
+static int
+checkSecLevel(SecurityLevel level)
   switch (level) {
   case RootOnly:
     if (getuid() == 0) { /* real uid is root */
@@ -152,16 +184,7 @@
   case Console:
     if (getuid() == 0) return TRUE; /* root */
-    /* see if stdin is a virtual console device */
-    if (fstat(0, &s) != 0) {
-      (void) fprintf(stderr,"X: cannot stat stdin\n");
-      return FALSE;
-    }
-    if (S_ISCHR(s.st_mode) &&
-        ((s.st_rdev >> 8) & 0xff) == VT_MAJOR_DEV &&
-        (s.st_rdev & 0xff) < 64) {
-      return TRUE;
-    }
+    if (onConsole()) return TRUE;
   case Anybody:
     return TRUE;

--- End Message ---
--- Begin Message ---
Source: xorg
Source-Version: 1:7.2-2

We believe that the bug you reported is fixed in the latest version of
xorg, which is due to be installed in the Debian FTP archive:

  to pool/main/x/xorg/libglu1-xorg-dev_7.2-2_all.deb
  to pool/main/x/xorg/libglu1-xorg_7.2-2_all.deb
  to pool/main/x/xorg/x-window-system-core_7.2-2_all.deb
  to pool/main/x/xorg/x-window-system_7.2-2_all.deb
  to pool/main/x/xorg/x11-common_7.2-2_i386.deb
  to pool/main/x/xorg/xlibmesa-dri_7.2-2_all.deb
  to pool/main/x/xorg/xlibmesa-gl-dev_7.2-2_all.deb
  to pool/main/x/xorg/xlibmesa-gl_7.2-2_all.deb
  to pool/main/x/xorg/xlibmesa-glu_7.2-2_all.deb
  to pool/main/x/xorg/xlibs-data_7.2-2_all.deb
  to pool/main/x/xorg/xlibs-static-dev_7.2-2_all.deb
  to pool/main/x/xorg/xorg-dev_7.2-2_all.deb
  to pool/main/x/xorg/xorg_7.2-2.dsc
  to pool/main/x/xorg/xorg_7.2-2.tar.gz
  to pool/main/x/xorg/xorg_7.2-2_all.deb
  to pool/main/x/xorg/xserver-xfree86_7.2-2_all.deb
  to pool/main/x/xorg/xserver-xorg-input-all_7.2-2_i386.deb
  to pool/main/x/xorg/xserver-xorg-video-all_7.2-2_i386.deb
  to pool/main/x/xorg/xserver-xorg_7.2-2_all.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 413454@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
David Nusinow <dnusinow@debian.org> (supplier of updated xorg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.7
Date: Sun, 15 Apr 2007 11:44:28 -0400
Source: xorg
Binary: x-window-system xlibs-static-dev xlibmesa-dri xserver-xorg-video-all xserver-xorg xorg-dev xserver-xorg-input-all libglu1-xorg-dev xlibmesa-glu xlibmesa-gl x11-common xserver-xfree86 xlibmesa-gl-dev x-window-system-core libglu1-xorg xlibs-data xorg
Architecture: source all i386
Version: 1:7.2-2
Distribution: experimental
Urgency: low
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: David Nusinow <dnusinow@debian.org>
 libglu1-xorg - transitional package for Debian etch
 libglu1-xorg-dev - transitional package for Debian etch
 x-window-system - transitional package for Debian etch
 x-window-system-core - transitional package for Debian etch
 x11-common - X Window System (X.Org) infrastructure
 xlibmesa-dri - transitional package for Debian etch
 xlibmesa-gl - transitional package for Debian etch
 xlibmesa-gl-dev - transitional package for Debian etch
 xlibmesa-glu - transitional package for Debian etch
 xlibs-data - transitional package for X11 client data
 xlibs-static-dev - transitional metapackage
 xorg       - X.Org X Window System
 xorg-dev   - the X.Org X Window System development libraries
 xserver-xfree86 - transitional package for moving from XFree86 to X.Org
 xserver-xorg - the X.Org X server
 xserver-xorg-input-all - the X.Org X server -- input driver metapackage
 xserver-xorg-video-all - the X.Org X server -- output driver metapackage
Closes: 363910 408114 413454 413492
 xorg (1:7.2-2) experimental; urgency=low
   [ Julien Cristau ]
   * Add support for kfreebsd-{amd64,i386} (closes: #363910).  Thanks,
     Robert Millan and Daniel Stone!
   * In xserver-xorg's postinst, delete old FontPaths pointing to CID fonts,
     are these aren't supported anymore.
   [ Colin Watson ]
   * debian/xserver-xorg.config.in: Improve expr return code handling in
     validate_nice_value; don't use run function when we need to check
     db_input's return value (LP: #68267).
   [ Julien Cristau ]
   * Drop references to obsolete modules in the debconf templates.
   * dexconf: don't add fontpaths in /usr/X11R6.
   * dexconf: point to the xorg.conf manpage, not /etc/X11/xorg.conf
     (closes: #408114).
   * Add patch from Guillem Jover <guillem@debian.org> to add console detection
     support for GNU/kFreeBSD to the X server wrapper (closes: #413454).
   * Add xserver-xorg-video-vmware to xserver-xorg-video-all's dependencies on
     amd64 (closes: #413492).
   [ David Nusinow ]
   * Add xserver-xorg-input-evtouch to the dependency list for
   * Remove code from dexconf, xserver-xorg.templates, and
     xserver-xorg.postinst to process the module list. The server will now have
     a default set of modules to be loaded and those can be added to or
     disabled in xorg.conf. This will require xserver-xorg-core 2:
     so bump the versioned dependency to it.
 d432f3a30a1daf6d9e93d92defe1b037 953 x11 optional xorg_7.2-2.dsc
 896a311fa4e525eecfc988591de2e2db 1014517 x11 optional xorg_7.2-2.tar.gz
 216d96b9d758d7f1584d14566f06cfb7 420018 x11 optional xserver-xorg_7.2-2_all.deb
 f0487c6d9cdbb7086e457efb87519880 18678 x11 optional xserver-xfree86_7.2-2_all.deb
 7a3aebe78ec3176846c90930297ff0a4 18984 x11 optional xorg_7.2-2_all.deb
 0eefafbd71ef5f6dcfa9a4f5a4ad08ca 19168 x11 optional xorg-dev_7.2-2_all.deb
 0c19ba5692052f678a4769641d7f4b09 18726 libs optional xlibs-data_7.2-2_all.deb
 fab1c055c60faacc54fa210f4abc9965 18840 libs optional xlibs-static-dev_7.2-2_all.deb
 6fb7f93ebdb3ada9646d28d9ba16efdd 18700 libs optional xlibmesa-dri_7.2-2_all.deb
 4580dc1909934a940e5ad12d3cf5b122 18704 libs optional xlibmesa-gl_7.2-2_all.deb
 98293a2db77115ada053d4cff9d85759 18712 libdevel optional xlibmesa-gl-dev_7.2-2_all.deb
 f7b64a99541660fe48f79776ef11bebb 18704 libdevel optional xlibmesa-glu_7.2-2_all.deb
 159ff512c8ac278eabd63938f8861708 18698 libs optional libglu1-xorg_7.2-2_all.deb
 b36555e01aae8806816331dbec92f238 18708 libdevel optional libglu1-xorg-dev_7.2-2_all.deb
 f9223d5d6c7d2b20db405900b6ff18a3 18748 x11 optional x-window-system_7.2-2_all.deb
 4c8e97f322aab77935acf80338d0d575 18760 x11 optional x-window-system-core_7.2-2_all.deb
 5b3270b5f0c6d13fd1e230141af2f5fc 334834 x11 optional x11-common_7.2-2_i386.deb
 aa069e50da0bcaa131d8948f5170bd3f 18932 x11 optional xserver-xorg-video-all_7.2-2_i386.deb
 d91f867e297ba47198f9099f8fa21f86 18776 x11 optional xserver-xorg-input-all_7.2-2_i386.deb

Version: GnuPG v1.4.6 (GNU/Linux)


--- End Message ---

Reply to: