ports/151581: misc/compat6x: fix bug with umask set less restrictive than 022

Eric F Crist ecrist at secure-computing.net
Tue Oct 19 17:50:07 UTC 2010


>Number:         151581
>Category:       ports
>Synopsis:       misc/compat6x: fix bug with umask set less restrictive than 022
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 19 17:50:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Eric F Crist
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
Secure Computing Networks & ClaimLynx, Inc
>Environment:
System: FreeBSD cartman.secure-computing.net 9.0-CURRENT FreeBSD 9.0-CURRENT #2: Mon Apr 12 12:46:23 CDT 2010 root at cartman.secure-computing.net:/usr/obj/usr/src/sys/GENERIC amd64

>Description:
	When a umask is set to allow group write permissionso the TARGET_DIR, LD refuses to load libraries upon boot,
	causing other ports to fail install and other general fun.  This same issue has been fixed by garga@ for compat5x
	and compat7x.
	
>How-To-Repeat:
	Set umask to 002 and install misc/compat6x. Any ports which require libraries provided by
	compat6x will fail to be found as ld refuses to read $PREFIX/lib/compat
>Fix:

	Set specific permissions on ${TARGET_DIR} upon creation, something sensible like 755.

--- compat6x.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/misc/compat6x/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	4 Dec 2009 06:34:49 -0000	1.9
+++ Makefile	19 Oct 2010 17:40:27 -0000
@@ -42,7 +42,7 @@
 .endif
 
 do-install:
-	@${MKDIR} ${TARGET_DIR}
+	@${MKDIR} -m 755 ${TARGET_DIR}
 .if ${OSVERSION} >= 800105
 	${RM} -f ${WRKSRC}/lib/libpthread.so.2
 	(cd ${TARGET_DIR} && ${LN} -sf libthr.so.2 libpthread.so.2)
--- compat6x.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list