From sec@ice.42.org  Tue Mar 19 01:46:23 2002
Return-Path: <sec@ice.42.org>
Received: from ice.42.org (ice.42.org [194.246.250.222])
	by hub.freebsd.org (Postfix) with ESMTP id 53CA637B400
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Mar 2002 01:46:23 -0800 (PST)
Received: by ice.42.org (Postfix, from userid 1000)
	id BB6394E3; Tue, 19 Mar 2002 10:46:21 +0100 (CET)
Message-Id: <20020319094621.BB6394E3@ice.42.org>
Date: Tue, 19 Mar 2002 10:46:21 +0100 (CET)
From: Stefan `Sec` Zehl <sec@42.org>
Reply-To: Stefan `Sec` Zehl <sec@42.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: xdm XDCMP says 'This account is currently not available'
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36084
>Category:       ports
>Synopsis:       xdm XDCMP says 'This account is currently not available'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 19 01:50:01 PST 2002
>Closed-Date:    Tue Mar 19 16:18:52 PST 2002
>Last-Modified:  Tue Mar 19 16:18:52 PST 2002
>Originator:     Stefan `Sec` Zehl
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD ice 4.5-STABLE FreeBSD 4.5-STABLE #10: Tue Jan 29 13:21:53 CET 2002 root@ice:/usr/export/obj/usr/export/src/sys/ICE i386

XFree86 4.2.0 as installed from the ports

| XFree86-clients-4.2.0 XFree86-4 Client environments
| XFree86-libraries-4.2.0 XFree86-4 include/(shared) library kit
| XFree86-manuals-4.2.0 XFree86-4 man pages

>Description:

If you use xdms XDCMP responses usually contain the load and number of
users of the box.

This is done via the line:

DisplayManager.willing:  su nobody -c /usr/X11R6/lib/X11/xdm/Xwilling

in /usr/X11R6/lib/X11/xdm/xdm-config

This fails with 'This account is currently not available'.

While searching for this problem I found it is also an OpenBSD PR
(system/2145)

>How-To-Repeat:

ice:~#su nobody -c /usr/X11R6/lib/X11/xdm/Xwilling
This account is currently not available.

To see this problem in action, modify /usr/X11R6/lib/X11/xdm/Xaccess
to allow XDCMP indirect/direct requests and start X with -indirect

>Fix:

Modify this line (add -m) to:

DisplayManager.willing:  su -m nobody -c /usr/X11R6/lib/X11/xdm/Xwilling

or give user nobody a shell (less recommended)

>Release-Note:
>Audit-Trail:

From: Will Andrews <will@csociety.org>
To: Stefan `Sec` Zehl <sec@42.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/36084: xdm XDCMP says 'This account is currently not available'
Date: Tue, 19 Mar 2002 11:58:55 -0500

 On Tue, Mar 19, 2002 at 10:46:21AM +0100, Stefan `Sec` Zehl wrote:
 > DisplayManager.willing:  su -m nobody -c /usr/X11R6/lib/X11/xdm/Xwilling
 
 Can you send a patch?  I don't use XDM and don't want to get this
 wrong.
 
 Thanks,
 -- 
 wca

From: Stefan `Sec` Zehl <sec@42.org>
To: Will Andrews <will@csociety.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/36084: xdm XDCMP says 'This account is currently not available'
Date: Tue, 19 Mar 2002 22:11:31 +0100

 --cmJC7u66zC7hs+87
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Tue, Mar 19, 2002 at 11:58:55AM -0500, Will Andrews wrote:
 > On Tue, Mar 19, 2002 at 10:46:21AM +0100, Stefan `Sec` Zehl wrote:
 > > DisplayManager.willing:  su -m nobody -c /usr/X11R6/lib/X11/xdm/Xwilling
 > 
 > Can you send a patch?  I don't use XDM and don't want to get this
 > wrong.
 
 Of course. Sorry it took me so long, but at first I didn't notice the
 patches all have to be in the files/ subdirectory of the
 XFree86-4-libraries port. %)
 
 CU,
     Sec
 -- 
 Consider the need for having to type "www.domain.name" a little IQ test
 that you have to take before you can access my web site.'     -- Wietse
 
 --cmJC7u66zC7hs+87
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch-xdm-config
 
 --- programs/xdm/config/Imakefile.org	Sun Nov 25 13:49:19 2001
 +++ programs/xdm/config/Imakefile	Tue Mar 19 18:11:50 2002
 @@ -28,7 +28,7 @@
  XDMPIDDIR = $(XDMDIR)
  #endif
  
 -#if defined(OpenBSDArchitecture) || defined(NetBSDArchitecture)
 +#if defined(OpenBSDArchitecture) || defined(NetBSDArchitecture) || defined(FreeBSDArchitecture)
  SU = "su -m"
  #else
  SU = su
 
 --cmJC7u66zC7hs+87--
State-Changed-From-To: open->closed 
State-Changed-By: will 
State-Changed-When: Tue Mar 19 16:18:40 PST 2002 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36084 
>Unformatted:
