From owner-freebsd-ports Mon Oct 15 17:40:16 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 63B5337B40E for ; Mon, 15 Oct 2001 17:40:12 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9G0eCi87711; Mon, 15 Oct 2001 17:40:12 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5049D37B40C for ; Mon, 15 Oct 2001 17:34:59 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9G0Yxb87397; Mon, 15 Oct 2001 17:34:59 -0700 (PDT) (envelope-from nobody) Message-Id: <200110160034.f9G0Yxb87397@freefall.freebsd.org> Date: Mon, 15 Oct 2001 17:34:59 -0700 (PDT) From: Heath Nielson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/31309: Running gdm causes a blank X sreen without a login box. Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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 ) 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