| Summary: | [PATCH] pw(8) seg faults; man page doesn't document lock feature | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | dima <dima> | ||||
| Component: | bin | Assignee: | dd <dd> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
State Changed From-To: open->suspended Patch committed to -current, awaiting MFC. Responsible Changed From-To: freebsd-bugs->dd My PR. State Changed From-To: suspended->closed MFC'd. |
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)