Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2001 17:34:59 -0700 (PDT)
From:      Heath Nielson <heath@cs.byu.edu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/31309: Running gdm causes a blank X sreen without a login box.
Message-ID:  <200110160034.f9G0Yxb87397@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         31309
>Category:       ports
>Synopsis:       Running gdm causes a blank X sreen without a login box.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 15 17:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Heath Nielson
>Release:        4.4-FreeBSD Stable
>Organization:
>Environment:
FreeBSD hershey.dyn.bar.net 4.4-STABLE FreeBSD 4.4-STABLE #1: Fri Oct 12 22:28:00 MDT 2001   heath@hershey.dyn.bar.net:/usr/src/sys/compile/HERSHEY  i386
>Description:
When gdm is run, a blank X screen appears.  The gdm login box doesn't appear and appears not to be running.  Users will be unable to login in.  This is due to the fact that gdm tries to set an environment variable "GDM_TIMED_LOGIN" with a NULL value.  This causes a Segmentation Fault on FreeBSD.  I'm not sure whether the value should be NULL or not, but by passing in a space rather than a NULL fixed the problem.  (Fix inspired from David Marker <marker_d@yahoo.com>)

Also there is a problem when gdm creates a local socket.  The sizeof() wasn't specified correctly causing a truncated filename to be created in the /tmp directory, when gdm tries to remove the file through an unlink() call, the unlink() fails and subsequent attempts to bind the local socket will fail with EADDRINUSE.

(BTW sorry for trashing the diffs by sending them through the web page, currently I have no other access to GNATS.)
>How-To-Repeat:
The message after installing gdm says that gdm only works with XFree86-3.3.x so this problem might not present itselft unless the user is running XFree86-4.

Install gdm, run (as root):
/usr/X11R6/bin/gdm -nodaemon
>Fix:
--- daemon/gdm-net.c.orig	Mon Oct 15 14:00:17 2001
+++ daemon/gdm-net.c	Mon Oct 15 14:00:26 2001
@@ -251,11 +251,11 @@
 		return NULL;
 	}
 
+	memset(&addr, 0, sizeof(addr));
 	strcpy (addr.sun_path, sockname);
 	addr.sun_family = AF_UNIX;
 	if (bind (fd,
-		  (struct sockaddr *) &addr, strlen (addr.sun_path) +
-		  sizeof (addr.sun_family)) < 0) {
+		  (struct sockaddr *) &addr, sizeof (addr)) < 0) {
 		gdm_error (_("%s: Could not bind socket"),
 			   "gdm_connection_open_unix");
 		close (fd);
--- daemon/slave.c.orig	Mon Oct 15 17:58:15 2001
+++ daemon/slave.c	Mon Oct 15 17:58:56 2001
@@ -1099,7 +1099,10 @@
 	/* this is again informal only, if the greeter does time out it will
 	 * not actually login a user if it's not enabled for this display */
 	if (d->timed_login_ok) {
-		ve_setenv ("GDM_TIMED_LOGIN_OK", ParsedTimedLogin, TRUE);
+		if(ParsedTimedLogin == NULL)
+			ve_setenv ("GDM_TIMED_LOGIN_OK", " ", TRUE);
+		else
+			ve_setenv ("GDM_TIMED_LOGIN_OK", ParsedTimedLogin, TRUE);
 	} else {
 		ve_unsetenv ("GDM_TIMED_LOGIN_OK");
 	}
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110160034.f9G0Yxb87397>