Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2000 15:46:47 -0700 (PDT)
From:      Steven Kehlet <kehlet@techfuel.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/18079: [PATCH] "pw usermod foobar -h -" broken
Message-ID:  <200004182246.PAA98229@basilisk.techfuel.com>

next in thread | raw e-mail | index | archive | help

>Number:         18079
>Category:       bin
>Synopsis:       [PATCH] "pw usermod foobar -h -" broken
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 18 15:50:01 PDT 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004182246.PAA98229>