From nobody@FreeBSD.org  Mon Jun 21 09:42:08 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5196F1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 21 Jun 2010 09:42:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 416A58FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 21 Jun 2010 09:42:08 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o5L9g8LP035832
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 21 Jun 2010 09:42:08 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o5L9g8vK035831;
	Mon, 21 Jun 2010 09:42:08 GMT
	(envelope-from nobody)
Message-Id: <201006210942.o5L9g8vK035831@www.freebsd.org>
Date: Mon, 21 Jun 2010 09:42:08 GMT
From: Alex Kozlov <spam@rm-rf.kiev.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] x11/xdm Fix auth in case of ro /usr
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         148035
>Category:       ports
>Synopsis:       [patch] x11/xdm Fix auth in case of ro /usr
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-x11
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 21 09:50:04 UTC 2010
>Closed-Date:    Fri Feb 25 17:21:31 UTC 2011
>Last-Modified:  Fri Feb 25 17:21:31 UTC 2011
>Originator:     Alex Kozlov
>Release:        RELENG_8
>Organization:
private
>Environment:
>Description:
xdm can't write auth file to ro /usr.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: x11/xdm/Makefile
@@ -39,5 +39,7 @@
 .for f in ${CFFILES}
 	${CP} -n ${EXAMPLESDIR}/$f ${PREFIX}/lib/X11/xdm/$f
 .endfor
+	${MKDIR} /var/lib/xdm/authdir
+	${LN} -sf /var/lib/xdm/authdir ${PREFIX}/lib/X11/xdm/authdir
 
 .include <bsd.port.mk>
Index: x11/xdm/pkg-plist
@@ -1,5 +1,6 @@
 bin/xdm
 bin/xdmshell
+lib/X11/xdm/authdir
 lib/X11/xdm/chooser
 lib/X11/xdm/libXdmGreet.a
 lib/X11/xdm/libXdmGreet.la
@@ -40,8 +41,13 @@
 @exec cp -n %D/%%EXAMPLESDIR%%/Xstartup %D/lib/X11/xdm/Xstartup
 @exec cp -n %D/%%EXAMPLESDIR%%/Xwilling %D/lib/X11/xdm/Xwilling
 @exec cp -n %D/%%EXAMPLESDIR%%/xdm-config %D/lib/X11/xdm/xdm-config
+@exec mkdir -p /var/lib/xdm/authdir
 @dirrmtry share/X11/app-defaults
 @dirrmtry share/X11
+@unexec rm -f /var/lib/xdm/authdir/authfiles/* 2>/dev/null || true
+@unexec rmdir /var/lib/xdm/authdir/authfiles 2>/dev/null || true
+@unexec rmdir /var/lib/xdm/authdir 2>/dev/null
+@unexec rmdir /var/lib/xdm 2>/dev/null
 @dirrm lib/X11/xdm/pixmaps
 @dirrm lib/X11/xdm
 @dirrm %%EXAMPLESDIR%%


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-x11 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jun 21 09:50:24 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148035 
State-Changed-From-To: open->patched 
State-Changed-By: miwi 
State-Changed-When: Fri Feb 25 15:12:08 UTC 2011 
State-Changed-Why:  
patched in xorg-dev 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148035 
State-Changed-From-To: patched->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Feb 25 17:21:31 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

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