Bug 25187

Summary: [PATCH] pw(8) seg faults; man page doesn't document lock feature
Product: Base System Reporter: dima <dima>
Component: binAssignee: dd <dd>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description dima 2001-02-18 11:00:02 UTC
When the user locking feature was added to pw(8), the help text in the
program and the manual page were not ammended.  The former problem
causes a segmentation fault due to an out-of-range array index when
trying to do `pw (un)lock help`.  The latter, combined with the
former, makes it unnecessarily difficult to figure out what lock and
unlock do.

Fix: The following patch,
  - documents the 'lock' and 'unlock' commands in the pw.8 manual page,
  - adds help text to pw.c which prevents the segmentation fault, and
  - mentions, in the built-in help, that the '-q' option is accepted
    for the 'usernext' and 'groupnext' commands (not entirely relevant
    to this problem).
How-To-Repeat: 
dima@hornet% /usr/sbin/pw lock help
Segmentation fault (core dumped)
dima@hornet% /usr/sbin/pw unlock help
Segmentation fault (core dumped)
Comment 1 dd freebsd_committer freebsd_triage 2001-03-14 03:24:43 UTC
State Changed
From-To: open->suspended

Patch committed to -current, awaiting MFC. 


Comment 2 dd freebsd_committer freebsd_triage 2001-03-14 03:24:43 UTC
Responsible Changed
From-To: freebsd-bugs->dd

My PR.
Comment 3 dd freebsd_committer freebsd_triage 2001-04-26 03:24:51 UTC
State Changed
From-To: suspended->closed

MFC'd.