Subject: pkg/24307: incorrect permissions on ${PREFIX}/share/ghostscript
To: None <gnats-bugs@gnats.netbsd.org>
From: None <brook@biology.nmsu.edu>
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
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.6.1
>Organization:
Brook G. Milligan Internet: brook@nmsu.edu
Department of Biology
New Mexico State University Telephone: (505) 646-7980
Las Cruces, New Mexico 88003 U.S.A. FAX: (505) 646-5665
>Environment:
System: NetBSD viola.nmsu.edu 1.6.1 NetBSD 1.6.1 (GENERIC_LAPTOP) #0: Tue Apr 8 12:21:37 UTC 2003 autobuild@tgm.daemon.org:/autobuild/netbsd-1-6/i386/OBJ/autobuild/netbsd-1-6/src/sys/arch/i386/compile/GENERIC_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
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.
>How-To-Repeat:
Install the ghostscript-fonts package and observe the
permissions on all directories in ${PREFIX}/share/ghostscript.
>Fix:
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 1.1.1.1
+++ Makefile 3 Feb 2004 02:41:01 -0000
@@ -38,6 +38,6 @@
${INSTALL_DATA} ${FILESDIR}/fonts.alias \
${PREFIX}/share/ghostscript/fonts/
${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/bsd.pkg.mk"
===========================================================================
>Release-Note:
>Audit-Trail:
>Unformatted: