Bug#691844: xauth: Failed X11 forwarding when using GDM via XDMCP

2012-10-30 Thread Stefan Voelkel
Package: xauth
Version: 1:1.0.4-1
Severity: normal
Tags: upstream patch


When using GDM via XDMCP, for examle when accessing GDM via
vncserver->XDMCP->localhost, ssh is no longer able to forward X11.

Invalid MIT-MAGIC-COOKIE-1 keyxterm Xt error: Can't open display:
localhost:10.0

The problem is, that xauth is unable to deal with the Family "FamilyWild" which
is used by GDM in XDMCP to store the MIT-MAGIC-COOKIE-1 for the user.

Attached are two patches, one for 1.0.4-1 and one for 1.0.7-1. The original
Patch is by Dr. Tilmann Bubeck.

Upstream Bug is at

https://bugs.freedesktop.org/show_bug.cgi?id=43425

FWIW, Redhat also has a bug for this:

https://bugzilla.redhat.com/show_bug.cgi?id=505545

-- System Information:
Debian Release: 6.0.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-xen-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages xauth depends on:
ii  libc6 2.11.3-4   Embedded GNU C Library: Shared lib
ii  libx11-6  2:1.3.3-4  X11 client-side library
ii  libxau6   1:1.0.6-1  X11 authorisation library
ii  libxext6  2:1.1.2-1  X11 miscellaneous extension librar
ii  libxmuu1  2:1.0.5-2  X11 miscellaneous micro-utility li

xauth recommends no packages.

xauth suggests no packages.

-- no debconf information
>From 5da21eaf6ec6537c3aab23adbebd617050e0c2c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20V=C3=B6lkel?= 
Date: Wed, 8 Aug 2012 14:13:08 +0200
Subject: [PATCH] improve to handle FamilyWild necessary for GDM/XDMCP/SSH #43425

---
 process.c |   76 +---
 1 files changed, 67 insertions(+), 9 deletions(-)

diff --git a/process.c b/process.c
index 893b51d..5a3984c 100644
--- a/process.c
+++ b/process.c
@@ -465,8 +465,11 @@ read_auth_entries(FILE *fp, Bool numeric, AuthList 
**headp, AuthList **tailp)
 return n;
 }
 
-static Bool 
-get_displayname_auth(char *displayname, AuthList **authl)
+/**
+ * Parse the given displayname and build a corresponding AuthList.
+ */
+static Bool
+get_displayname_auth(const char *displayname, AuthList **authl)
 {
 int family;
 char *host = NULL, *rest = NULL;
@@ -997,6 +1000,9 @@ dump_entry(char *inputfilename, int lineno, Xauth *auth, 
char *data)
fwrite (auth->address, sizeof (char), auth->address_length, fp);
fprintf (fp, "/unix");
break;
+ case FamilyWild:
+   fwrite (auth->address, sizeof (char), auth->address_length, fp);
+   break;
  case FamilyInternet:
 #if defined(IPv6) && defined(AF_INET6)
  case FamilyInternet6:
@@ -1079,6 +1085,49 @@ match_auth_dpy(register Xauth *a, register Xauth *b)
 memcmp(a->number, b->number, a->number_length) == 0) ? 1 : 0);
 }
 
+static int
+match_authwild_dpy(register Xauth *a, const char *displayname)
+{
+int family;
+char *host = NULL, *rest = NULL;
+int dpynum, scrnum;
+char dpynumbuf[40];/* want to hold largest display 
num */
+
+if ( a->family != FamilyWild )
+   return False;
+
+if (!parse_displayname (displayname,
+   &family, &host, &dpynum, &scrnum, &rest)) {
+   free(host);
+   free(rest);
+
+   return False;
+}
+
+dpynumbuf[0] = '\0';
+sprintf (dpynumbuf, "%d", dpynum);
+
+if (a->address_length != strlen(host) || a->number_length != 
strlen(dpynumbuf)) {
+   free(host);
+   free(rest);
+
+return False;
+}
+
+if (memcmp(a->address, host, a->address_length) == 0 &&
+memcmp(a->number, dpynumbuf, a->number_length) == 0) {
+   free(host);
+   free(rest);
+
+return True;
+} else {
+   free(host);
+   free(rest);
+
+return False;
+   }
+}
+
 /* return non-zero iff display and authorization type are the same */
 
 static int 
@@ -1242,13 +1291,22 @@ iterdpy (char *inputfilename, int lineno, int start,
/* l may be freed by remove_entry below. so save its contents */
next = l->next;
tmp_auth = copyAuth(l->auth);
-   for (proto = proto_head; proto; proto = proto->next) {
-   if (match_auth_dpy (proto->auth, tmp_auth)) {
-   matched = True;
-   if (yfunc) {
-   status = (*yfunc) (inputfilename, lineno,
-  tmp_auth, data);
-   if (status < 0) break;
+
+   if ( match_authwild_dpy(tmp_auth, displayname) ) {
+   matched = True;
+   if (yfunc) {
+   status = (*yfunc) (inputfilename, lineno,
+  tmp_auth, data);
+   }
+   } else {
+   for (proto = proto_he

Bug#691870: libdrm: VCS is missing upstream tags

2012-10-30 Thread Adrian Knoth
Package: libdrm-dev
Version: 2.4.39-1
Severity: wishlist
File: libdrm

Hi X-force!

Your git repos miss the upstream tags, e.g., upstream/2.4.39. This also
holds true for xserver-xorg-video-nouveau.

It's not terribly bad, but it at least gives git-buildpackage a hiccup
until one manually tags the upstream branch.

If possible, please push the missing tags.


Cheers

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.6.4 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to 
en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libdrm-dev depends on:
ii  libdrm-intel12.4.39-1
ii  libdrm-nouveau2  2.4.39-1
ii  libdrm-radeon1   2.4.39-1
ii  libdrm2  2.4.39-1
ii  libkms1  2.4.39-1

libdrm-dev recommends no packages.

libdrm-dev suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20121030145351.3735.20960.reportbug@foh



Bug#691870: marked as done (libdrm: VCS is missing upstream tags)

2012-10-30 Thread Debian Bug Tracking System
Your message dated Tue, 30 Oct 2012 17:34:58 +0100
with message-id <20121030163458.ga25...@mraw.org>
and subject line Re: Bug#691870: libdrm: VCS is missing upstream tags
has caused the Debian Bug report #691870,
regarding libdrm: VCS is missing upstream tags
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
691870: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691870
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libdrm-dev
Version: 2.4.39-1
Severity: wishlist
File: libdrm

Hi X-force!

Your git repos miss the upstream tags, e.g., upstream/2.4.39. This also
holds true for xserver-xorg-video-nouveau.

It's not terribly bad, but it at least gives git-buildpackage a hiccup
until one manually tags the upstream branch.

If possible, please push the missing tags.


Cheers

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.6.4 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to 
en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libdrm-dev depends on:
ii  libdrm-intel12.4.39-1
ii  libdrm-nouveau2  2.4.39-1
ii  libdrm-radeon1   2.4.39-1
ii  libdrm2  2.4.39-1
ii  libkms1  2.4.39-1

libdrm-dev recommends no packages.

libdrm-dev suggests no packages.

-- no debconf information
--- End Message ---
--- Begin Message ---
Hi Adrian!

Adrian Knoth  (30/10/2012):
> Package: libdrm-dev
> Version: 2.4.39-1
> Severity: wishlist
> File: libdrm

This is certainly not a bug in the package, closing.

> Your git repos miss the upstream tags, e.g., upstream/2.4.39. This
> also holds true for xserver-xorg-video-nouveau.
> 
> It's not terribly bad, but it at least gives git-buildpackage a
> hiccup until one manually tags the upstream branch.

dpkg-buildpackage/debuild just work.

If you want upstream tags, add an upstream remote. If you work on
several X repositories, you may find xsf-remote-add-upstream[1]
useful.

 1. http://x.debian.net/reference/git-usage.html

Mraw,
KiBi.


signature.asc
Description: Digital signature
--- End Message ---