From kehlet@techfuel.com  Tue Apr 18 15:46:50 2000
Return-Path: <kehlet@techfuel.com>
Received: from cerberus.techfuel.com (irvine.techfuel.com [209.80.51.55])
	by hub.freebsd.org (Postfix) with ESMTP id 1523237B9BF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Apr 2000 15:46:49 -0700 (PDT)
	(envelope-from kehlet@techfuel.com)
Received: from basilisk.techfuel.com (basilisk.techfuel.com [172.16.1.2])
	by cerberus.techfuel.com (8.9.3/8.9.3) with ESMTP id PAA71645
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Apr 2000 15:46:47 -0700 (PDT)
Received: (from kehlet@localhost)
	by basilisk.techfuel.com (8.9.3/8.9.3) id PAA98229;
	Tue, 18 Apr 2000 15:46:47 -0700 (PDT)
Message-Id: <200004182246.PAA98229@basilisk.techfuel.com>
Date: Tue, 18 Apr 2000 15:46:47 -0700 (PDT)
From: Steven Kehlet <kehlet@techfuel.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] "pw usermod foobar -h -" broken
X-Send-Pr-Version: 3.2

>Number:         18079
>Category:       bin
>Synopsis:       [PATCH] "pw usermod foobar -h -" broken
>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:   Tue Apr 18 15:50:01 PDT 2000
>Closed-Date:    Wed Jul 19 21:00:23 PDT 2000
>Last-Modified:  Wed Jul 19 21:01:13 PDT 2000
>Originator:     Steven Kehlet <kehlet@techfuel.com>
>Release:        
>Organization:
>Environment:

-current

>Description:

pw usermod foobar -h -  should lock the user's account but doesn't
work.  The fix is trivial.  I know this functionality is replaced
with pw lock and unlock but this should still be fixed for backwards
compatibility.

>How-To-Repeat:

pw usermod foobar -h -

>Fix:
	
Index: pw_user.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pw/pw_user.c,v
retrieving revision 1.34
diff -c -r1.34 pw_user.c
*** pw_user.c	2000/01/15 00:20:21	1.34
--- pw_user.c	2000/04/18 22:41:22
***************
*** 586,594 ****
  	}
  
  	if ((arg = getarg(args, 'h')) != NULL) {
! 		if (strcmp(arg->val, "-") == 0)
  			pwd->pw_passwd = "*";	/* No access */
! 		else {
  			int             fd = atoi(arg->val);
  			int             b;
  			int             istty = isatty(fd);
--- 586,595 ----
  	}
  
  	if ((arg = getarg(args, 'h')) != NULL) {
! 		if (strcmp(arg->val, "-") == 0) {
  			pwd->pw_passwd = "*";	/* No access */
! 			edited = 1;
! 		} else {
  			int             fd = atoi(arg->val);
  			int             b;
  			int             istty = isatty(fd);

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nra 
State-Changed-When: Wed Jul 19 21:00:23 PDT 2000 
State-Changed-Why:  
davidn fixed this in revision 1.40 of pw/pw_user.c. 


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