* 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

@ -917,7 +917,7 @@ static void process_flags (int argc, char **argv)
Gflg++;
break;
case 'l':
if (!check_user_name (optarg)) {
if (!is_valid_user_name (optarg)) {
fprintf (stderr,
_("%s: invalid field '%s'\n"),
Prog, optarg);