diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-06-07 19:03:41 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-06-07 19:03:41 +0000 |
commit | ecddcdd12d894cb5522d8c22536d53f1c8cce857 (patch) | |
tree | 8e853de567e547095b25456d77f133b74e999930 /pw/pw.h | |
parent | 46d579ce2a5795de6e64374df8158c406039d622 (diff) | |
download | pw-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |