From nobody@FreeBSD.org  Mon Mar 25 00:26:53 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 9707737B400
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Mar 2002 00:26:53 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g2P8Qr974637;
	Mon, 25 Mar 2002 00:26:53 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200203250826.g2P8Qr974637@freefall.freebsd.org>
Date: Mon, 25 Mar 2002 00:26:53 -0800 (PST)
From: Gerald Stoller <Gerald_Stoller@hotmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: User not in group wheel creates a file and its group is listed as wheel
X-Send-Pr-Version: www-1.0

>Number:         36281
>Category:       misc
>Synopsis:       User not in group wheel creates a file and its group is listed as wheel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 25 00:30:01 PST 2002
>Closed-Date:    Mon Mar 25 01:33:54 PST 2002
>Last-Modified:  Mon Mar 25 01:33:54 PST 2002
>Originator:     Gerald Stoller
>Release:        4.3
>Organization:
self
>Environment:
FreeBSD  4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001         jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC  i386
>Description:
User not in group wheel creates a file and its group is listed as wheel, but when checked with "test -G" one sees that it is not really assigned to that group, it is just so reported.
>How-To-Repeat:
       I produced the problem after issuing the command 'script' [I use the Korn shell, and editing previous commands caused some "command lines" that were never executed to appear in the script] which I would like to attach to this report; since I don't see any way to do that, I will copy it here (some static conditions are shown in it, i.e., I don't create a user not in the group wheel, he's already there):

Script started on Sun Mar 17 12:51:12 2002
$ echo    wertgbnmkk  >b

$ ll  ?

-rw-r--r--  1 lstoller  wheel  11 Mar 17 12:51 b
-rw-r--r--  1 lstoller  wheel  11 Mar 17 12:48 c
$ if   test   -G b

> then    print   same

> else    print   samenot

> fi

samenot
$ grep  stoller  /etc/passwd

kstoller:*:1001:0:G S Stoller:/home/kstoller:/bin/ksh
tstoller:*:1000:0:G S Stoller:/home/tstoller:/bin/ksh
lstoller:*:1002:1000:G S Stoller:/home/lstoller:/bin/ksh
$ grep  stoller  /etc/passwd
$ grep  stoller  /etc/
$                           
$ grep  stoller  /etc/passwd
$ grep  stoller  /etc/      group

tstoller:*:1000:
$ grep  stoller  /etc/group
$ egrep  stoller  /etc/group
$ eegrep  wstoller  /etc/group
$ egrep  whstoller  /etc/group
$ egrep  whestoller  /etc/group
$ egrep  wheestoller  /etc/group
$ egrep  wheelstoller  /etc/group
$ egrep  wheel\stoller  /etc/group
$ egrep  wheel\|stoller  /etc/group
$ egrep  wheel\|

wheel:*:0:root
tstoller:*:1000:
$ ^D


Script done on Sun Mar 17 12:56:22 2002
Script started on Sun Mar 17 13:28:50 2002
$ uname -a

FreeBSD  4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001     jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC  i386
$ ^D


Script done on Sun Mar 17 13:29:39 2002

>Fix:
      
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cjc 
State-Changed-When: Mon Mar 25 01:31:03 PST 2002 
State-Changed-Why:  
This is not a bug. This is the expected behavior. The group of the 
process has nothing to do with the group of the file created. The 
group of the file is determined by the group of the directory the file 
is written to. 

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