Subject: pkg/24307: incorrect permissions on ${PREFIX}/share/ghostscript
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/02/2004 19:52:07
>Number:         24307
>Category:       pkg
>Synopsis:       incorrect permissions on ${PREFIX}/share/ghostscript
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 03 02:53:00 UTC 2004
>Release:        NetBSD 1.6.1
Brook G. Milligan                      Internet:
Department of Biology
New Mexico State University            Telephone:  (505) 646-7980
Las Cruces, New Mexico  88003  U.S.A.  FAX:        (505) 646-5665
System: NetBSD 1.6.1 NetBSD 1.6.1 (GENERIC_LAPTOP) #0: Tue Apr 8 12:21:37 UTC 2003 i386
Architecture: i386
Machine: i386
	After the fonts/ghostscript-fonts package installs fonts in
${PREFIX}/share/ghostscript, it resets permissions on all files and
directories with the following command (line 41 in Makefile):

	${CHMOD} -R a-w ${PREFIX}/share/ghostscript

Of course, this removes write permissions from all the directories,
not just the files.  Subsequently, no user except root can install or
remove files in these directories.  As a result, if one is installing
packages as an unprivileged user, none of the other ghostscript
packages can add files to ${PREFIX}/share/ghostscript.
	Install the ghostscript-fonts package and observe the
permissions on all directories in ${PREFIX}/share/ghostscript.
	Apply the following patch in fonts/ghostscript-fonts.  This
will only change permissions on files, not directories.

--- Makefile    21 Jan 2004 22:42:54 -0000
+++ Makefile    3 Feb 2004 02:41:01 -0000
@@ -38,6 +38,6 @@
        ${INSTALL_DATA} ${FILESDIR}/fonts.alias \
        ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/ghostscript
-       ${CHMOD} -R a-w ${PREFIX}/share/ghostscript
+       ${FIND} -X ${PREFIX}/share/ghostscript ! -type d -print | ${XARGS} ${CHMOD} a-w

 .include "../../mk/"