From nobody@FreeBSD.org  Fri Jul 21 19:00:20 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 160EC16A4DE
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Jul 2006 19:00:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5B52343D53
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Jul 2006 19:00:19 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6LJ0JYf032926
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Jul 2006 19:00:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k6LJ0Jnp032923;
	Fri, 21 Jul 2006 19:00:19 GMT
	(envelope-from nobody)
Message-Id: <200607211900.k6LJ0Jnp032923@www.freebsd.org>
Date: Fri, 21 Jul 2006 19:00:19 GMT
From: Luke Kanies <luke@madstop.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 'pw groupadd' does not accept -o, contrary to man page
X-Send-Pr-Version: www-2.3

>Number:         100684
>Category:       bin
>Synopsis:       [patch] pw(8): 'pw groupadd' does not accept -o, contrary to man page
>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:   Fri Jul 21 19:00:32 GMT 2006
>Closed-Date:    Sun Oct 08 05:38:00 GMT 2006
>Last-Modified:  Sun Oct 08 05:38:00 GMT 2006
>Originator:     Luke Kanies
>Release:        5.4-RELEASE
>Organization:
Reductive Labs
>Environment:
FreeBSD freebsd1.madstop.com 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May  8 10:21:06 UTC 2005     root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
The man page of 'pw' claims that both useradd and groupadd arguments accept
the '-o' option, to override GUI or UID.  This works fine with useradd, but
not with groupadd.
>How-To-Repeat:
Try to call 'pw groupadd' with -o:

luke@freebsd1(0) $ sudo pw groupadd group2 -g 125 -o
pw: illegal option -- o
pw: unknown switch
luke@freebsd1(64) $ 

The number in parens, 0 then 64, is $?; thus, pw is exiting with the code 64.
>Fix:

>Release-Note:
>Audit-Trail:

From: "Devon H. O'Dell" <devon.odell@coyotepoint.com>
To: bug-followup@FreeBSD.org,  luke@madstop.com
Cc:  
Subject: Re: bin/100684 : pw(8): 'pw groupadd' does not accept -o, contrary
 to man page
Date: Wed, 13 Sep 2006 17:26:19 -0400

 This is a multi-part message in MIME format.
 --------------030802090508020204090809
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 The fix is really silly. Somebody just forgot to add 'o' to the getopt 
 flags. Attached is patch; also at http://databits.net/~dho/pw.patch
 
 Kind regards,
 
 --Devon
 
 --------------030802090508020204090809
 Content-Type: text/plain;
  name="pw.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="pw.patch"
 
 Index: usr.sbin/pw/pw.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/pw/pw.c,v
 retrieving revision 1.27
 diff -u -r1.27 pw.c
 --- usr.sbin/pw/pw.c	11 Jan 2004 18:28:08 -0000	1.27
 +++ usr.sbin/pw/pw.c	13 Sep 2006 21:23:27 -0000
 @@ -115,7 +115,7 @@
  			"V:C:q"
  		},
  		{ /* grp  */
 -			"V:C:qn:g:h:H:M:pNPY",
 +			"V:C:qn:g:h:H:M:opNPY",
  			"V:C:qn:g:Y",
  			"V:C:qn:g:l:h:H:FM:m:NPY",
  			"V:C:qn:g:FPa",
 
 --------------030802090508020204090809--
State-Changed-From-To: open->patched 
State-Changed-By: maxim 
State-Changed-When: Mon Sep 18 14:01:18 UTC 2006 
State-Changed-Why:  
Fixed in HEAD.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100684 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/100684: commit references a PR
Date: Mon, 18 Sep 2006 14:01:17 +0000 (UTC)

 maxim       2006-09-18 14:00:39 UTC
 
   FreeBSD src repository
 
   Modified files:
     usr.sbin/pw          pw.c 
   Log:
   o Fix groupadd getopt line and make 'pw groupadd -o' work.
   
   PR:             bin/100684
   Submitted by:   Devon H. O'Dell
   MFC after:      3 weeks
   
   Revision  Changes    Path
   1.28      +1 -1      src/usr.sbin/pw/pw.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: maxim 
State-Changed-When: Sun Oct 8 05:37:44 UTC 2006 
State-Changed-Why:  
Merged to RELENG_6. 

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