From 7d8cc6729f3fcf5fb4c38936179b2c0b9b026130 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 7 Jun 2015 19:03:41 +0000 Subject: Refactor input validation Mutualize code to validate inputs of both 'user' and 'group' command Test that the input name fits into MAXLOGNAME --- pw/pw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pw/pw.h') 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); -- cgit v1.2.3