From hohmuth@sax.sax.de  Wed Aug 16 04:44:28 1995
Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11])
          by freefall.FreeBSD.org (8.6.11/8.6.6) with SMTP id EAA19938
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Aug 1995 04:44:16 -0700
Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP
	(5.67b+/DEC-Ultrix/4.3) id AA13272; Wed, 16 Aug 1995 13:42:54 +0200
Received: by sax.sax.de (8.6.11/8.6.12-s1)
	id NAA21628; Wed, 16 Aug 1995 13:42:53 +0200
Message-Id: <199508161142.NAA21628@sax.sax.de>
Date: Wed, 16 Aug 1995 13:42:53 +0200
From: hohmuth@sax.de
Reply-To: bugs@sax.sax.de
To: FreeBSD-gnats-submit@freebsd.org
Cc: bugs@sax.sax.de
Subject: `pkg_add' is umask-sensitive
X-Send-Pr-Version: 3.2

>Number:         693
>Category:       bin
>Synopsis:       `pkg_add' is umask-sensitive
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jkh
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 16 04:50:01 PDT 1995
>Closed-Date:    Sun Jun 2 21:47:26 PDT 1996
>Last-Modified:  Sun Jun  2 21:48:19 PDT 1996
>Originator:     Michael Hohmuth
>Release:        FreeBSD 2.0.5-RELEASE i386
>Organization:
SaxNet-Verein
>Environment:

"uname -a" says:

    FreeBSD sax.sax.de 2.0.5-RELEASE FreeBSD 2.0.5-RELEASE #1: Mon Aug 14 21:18:11 MET DST 1995     root@sax.sax.de:/usr/src/sys/compile/SAX  i386

>Description:

`pkg_add' is too sensitive to umask-settings:  If umask is 077, files
created by `pkg_add' will have these bits masked out in their mode,
rendering them useless for all users except root.

>How-To-Repeat:

root(hohmuth)@sax:~# umask 77
root(hohmuth)@sax:~# pkg_add /ftp/pub/os/FreeBSD/2.0.5-RELEASE/packages/All/top-3.3.tgz
missing: ./include (created)
missing: ./man/cat1 (created)
missing: ./man/cat2 (created)
missing: ./man/cat3 (created)
missing: ./man/cat4 (created)
missing: ./man/cat5 (created)
missing: ./man/cat6 (created)
missing: ./man/cat7 (created)
missing: ./man/cat8 (created)
missing: ./man/catl (created)
missing: ./man/man2 (created)
missing: ./man/man3 (created)
missing: ./man/man6 (created)
missing: ./man/man7 (created)
missing: ./man/manl (created)
missing: ./man/skel (created)
root(hohmuth)@sax:~# /bin/ls -laF /usr/local/bin/top /usr/local/man/man1/top.1 
-rwx--S---  1 root  kmem  38593 Jun  6 12:34 /usr/local/bin/top*
-rwx------  1 root  bin   10621 Jun  6 12:34 /usr/local/man/man1/top.1*

>Fix:
	
Workaround:  Say "umask 22" before `pgk_add'.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jkh 
Responsible-Changed-By: pst 
Responsible-Changed-When: Wed Feb 7 18:15:34 PST 1996 
Responsible-Changed-Why:  
package 
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Sun Jun 2 21:47:26 PDT 1996 
State-Changed-Why:  
I can't decide if this is a bug or a feature. :-) 
>Unformatted:
