From seggers@semyam.dinoco.de  Sun Sep 20 10:23:36 1998
Received: from tim.xenologics.com (tim.xenologics.com [194.77.5.24])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA28491
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Sep 1998 10:23:31 -0700 (PDT)
          (envelope-from seggers@semyam.dinoco.de)
Received: (from uucp@localhost)
	by tim.xenologics.com (8.8.5/8.8.8) with UUCP id TAA08547
	for FreeBSD-gnats-submit@freebsd.org; Sun, 20 Sep 1998 19:21:58 +0200 (MET DST)
Received: (from seggers@localhost)
	by semyam.dinoco.de (8.9.1/8.8.8) id SAA01653;
	Sun, 20 Sep 1998 18:51:57 +0200 (CEST)
	(envelope-from seggers)
Message-Id: <199809201651.SAA01653@semyam.dinoco.de>
Date: Sun, 20 Sep 1998 18:51:57 +0200 (CEST)
From: Stefan Eggers <seggers@semyam.dinoco.de>
Reply-To: seggers@semyam.dinoco.de
To: FreeBSD-gnats-submit@freebsd.org
Cc: seggers@semyam.dinoco.de
Subject: pkg_add seems to have unneeded umask
X-Send-Pr-Version: 3.2

>Number:         7998
>Category:       bin
>Synopsis:       pkg_add seems to have unneeded umask
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jkh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 20 10:30:00 PDT 1998
>Closed-Date:    Wed Aug 15 07:22:19 PDT 2001
>Last-Modified:  Wed Aug 15 07:22:38 PDT 2001
>Originator:     Stefan Eggers
>Release:        FreeBSD 3.0-BETA i386
>Organization:
none
>Environment:

	-current from today.

>Description:

	pkg_add's perform.c seems to have an unnecessary umask call in
it.  This sets the umask to 022 before registering the new package.
As it is already 022 due to the umask in main() introduced in 1.18 on
September 14 I think this one can be removed.

>How-To-Repeat:

>Fix:
	
	Untested as I don't think it is wise to change the sources
while a buildworld is working on it and I have to catch up with
reading the commit logs.  ;-)

--- /usr2/FreeBSD/src/usr.sbin/pkg_install/add/perform.c	Sun Sep 13 14:42:13 1998
+++ perform.c	Sun Sep 20 18:46:16 1998
@@ -366,7 +366,6 @@
 	char contents[FILENAME_MAX];
 	FILE *cfile;
 
-	umask(022);
 	if (getuid() != 0)
 	    warnx("not running as root - trying to record install anyway");
 	if (!PkgName) {
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jkh 
Responsible-Changed-By: johan 
Responsible-Changed-When: Thu Aug 10 07:18:31 PDT 2000 
Responsible-Changed-Why:  
Jordan introduced the umask call in main.c rev 1.18 
Can the umask call in perform.c be removed? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=7998 
State-Changed-From-To: open->closed 
State-Changed-By: sobomax 
State-Changed-When: Wed Aug 15 07:22:19 PDT 2001 
State-Changed-Why:  
Patch committed, thank you for submission! 

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