summaryrefslogtreecommitdiffstats
path: root/pw/pw.h
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-06-07 19:03:41 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-06-07 19:03:41 +0000
commitecddcdd12d894cb5522d8c22536d53f1c8cce857 (patch)
tree8e853de567e547095b25456d77f133b74e999930 /pw/pw.h
parent46d579ce2a5795de6e64374df8158c406039d622 (diff)
downloadpw-darwin-ecddcdd12d894cb5522d8c22536d53f1c8cce857.tar.gz
pw-darwin-ecddcdd12d894cb5522d8c22536d53f1c8cce857.tar.zst
pw-darwin-ecddcdd12d894cb5522d8c22536d53f1c8cce857.zip
Refactor input validation
Mutualize code to validate inputs of both 'user' and 'group' command Test that the input name fits into MAXLOGNAME
Diffstat (limited to 'pw/pw.h')
-rw-r--r--pw/pw.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/pw/pw.h b/pw/pw.h
index 9c0aa32..6239004 100644
--- a/pw/pw.h
+++ b/pw/pw.h
@@ -82,8 +82,8 @@ int write_userconfig(char const * file);
struct carg *addarg(struct cargs * _args, int ch, char *argstr);
struct carg *getarg(struct cargs * _args, int ch);
-int pw_user(int mode, struct cargs * _args);
-int pw_group(int mode, struct cargs * _args);
+int pw_user(int mode, char *name, long id, struct cargs * _args);
+int pw_group(int mode, char *name, long id, struct cargs * _args);
char *pw_checkname(char *name, int gecos);
int addnispwent(const char *path, struct passwd *pwd);