]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - pw/pw.c
pw_checkname since the beginning if too strict on GECOS field,
[pw-darwin.git] / pw / pw.c
diff --git a/pw/pw.c b/pw/pw.c
index b13db70a57d110b6d1f0cb670fa35d9e3393f3e0..700a7b2e533219581ffc825a47a51eea4cf1e3f2 100644 (file)
--- a/pw/pw.c
+++ b/pw/pw.c
@@ -32,9 +32,10 @@ static const char rcsid[] =
 #include <err.h>
 #include <fcntl.h>
 #include <locale.h>
-#include <paths.h>
-#include <stdbool.h>
-#include <sys/wait.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
 #include "pw.h"
 
 const char     *Modes[] = {
@@ -232,7 +233,7 @@ cmdhelp(int mode, int which)
                        {
                                "usage: pw useradd [name] [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-C config      configuration file\n"
                                "\t-q             quiet operation\n"
                                "  Adding users:\n"
@@ -255,7 +256,7 @@ cmdhelp(int mode, int which)
                                "\t-N             no update\n"
                                "  Setting defaults:\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-D             set user defaults\n"
                                "\t-b dir         default home root dir\n"
                                "\t-e period      default expiry period\n"
@@ -272,7 +273,7 @@ cmdhelp(int mode, int which)
                                "\t-y path        set NIS passwd file path\n",
                                "usage: pw userdel [uid|name] [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-n name        login name\n"
                                "\t-u uid         user id\n"
                                "\t-Y             update NIS maps\n"
@@ -280,7 +281,7 @@ cmdhelp(int mode, int which)
                                "\t-r             remove home & contents\n",
                                "usage: pw usermod [uid|name] [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-C config      configuration file\n"
                                "\t-q             quiet operation\n"
                                "\t-F             force add if no user\n"
@@ -305,7 +306,7 @@ cmdhelp(int mode, int which)
                                "\t-N             no update\n",
                                "usage: pw usershow [uid|name] [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-n name        login name\n"
                                "\t-u uid         user id\n"
                                "\t-F             force print\n"
@@ -314,7 +315,7 @@ cmdhelp(int mode, int which)
                                "\t-7             print in v7 format\n",
                                "usage: pw usernext [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-C config      configuration file\n"
                                "\t-q             quiet operation\n",
                                "usage pw: lock [switches]\n"
@@ -329,7 +330,7 @@ cmdhelp(int mode, int which)
                        {
                                "usage: pw groupadd [group|gid] [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-C config      configuration file\n"
                                "\t-q             quiet operation\n"
                                "\t-n group       group name\n"
@@ -340,13 +341,13 @@ cmdhelp(int mode, int which)
                                "\t-N             no update\n",
                                "usage: pw groupdel [group|gid] [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-n name        group name\n"
                                "\t-g gid         group id\n"
                                "\t-Y             update NIS maps\n",
                                "usage: pw groupmod [group|gid] [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-C config      configuration file\n"
                                "\t-q             quiet operation\n"
                                "\t-F             force add if not exists\n"
@@ -360,7 +361,7 @@ cmdhelp(int mode, int which)
                                "\t-N             no update\n",
                                "usage: pw groupshow [group|gid] [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-n name        group name\n"
                                "\t-g gid         group id\n"
                                "\t-F             force print\n"
@@ -368,7 +369,7 @@ cmdhelp(int mode, int which)
                                "\t-a             print all accounting groups\n",
                                "usage: pw groupnext [switches]\n"
                                "\t-V etcdir      alternate /etc location\n"
-                               "\t-R rootir      alternate root directory\n"
+                               "\t-R rootdir     alternate root directory\n"
                                "\t-C config      configuration file\n"
                                "\t-q             quiet operation\n"
                        }