* libmisc/chkname.h, libmisc/chkname.c: check_group_name (resp.

check_user_name) renamed to is_valid_user_name (resp.
	is_valid_group_name). is_valid_user_name and is_valid_group_name
	return a bool.
	* src/grpck.c, src/newusers.c, src/usermod.c, src/useradd.c,
	src/groupmod.c, src/pwck.c, src/groupadd.c: Use is_valid_user_name
	and is_valid_group_name, following above change.
	* libmisc/chkname.c: Avoid implicit conversion of chars to
	booleans. Add brackets and parenthesis.
This commit is contained in:
nekral-guest
2008-05-25 20:58:16 +00:00
parent cb8d416b37
commit 623d9e2ab3
10 changed files with 59 additions and 33 deletions

View File

@@ -34,13 +34,16 @@
#define _CHKNAME_H_
/*
* check_user_name(), check_group_name() - check the new user/group
* name for validity; return value: 1 - OK, 0 - bad name
* is_valid_user_name(), is_valid_group_name() - check the new user/group
* name for validity;
* return values:
* true - OK
* false - bad name
*/
#include "defines.h"
extern int check_user_name (const char *);
extern int check_group_name (const char *name);
extern bool is_valid_user_name (const char *name);
extern bool is_valid_group_name (const char *name);
#endif