Bug 216594 - pw usernext ignores config option
Summary: pw usernext ignores config option
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-01-30 08:28 UTC by Gert Doering
Modified: 2017-01-30 11:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gert Doering 2017-01-30 08:28:36 UTC
"pw usernext -C /my/pw.conf"

ignores the "-C" option, due to a bug in pw/pw_user.c, line 747 - the "getopt()" statement has "Cq" as arguments, but it needs to be "C:q"

--- pw_user.c.orig      2017-01-30 09:28:02.620426968 +0100
+++ pw_user.c   2017-01-30 09:27:51.560428192 +0100
@@ -744,7 +744,7 @@
        bool quiet = false;
        uid_t next;
 
-       while ((ch = getopt(argc, argv, "Cq")) != -1) {
+       while ((ch = getopt(argc, argv, "C:q")) != -1) {
                switch (ch) {
                case 'C':
                        cfg = optarg;