* mkgroup.c (enum_local_groups): Avoid error message if given group

name isn't found and return 0 to allow searching to proceed.  Always
	return 0 or 1, not -1.
	(enum_groups): Avoid error message if given group name isn't found.
	* mkpasswd.c (enum_users): Ditto.
This commit is contained in:
Corinna Vinschen
2009-08-11 08:59:50 +00:00
parent b1ce1770ea
commit 91dd009e81
3 changed files with 24 additions and 3 deletions

View File

@ -411,6 +411,10 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
rc = NetUserGetInfo (servername, (LPWSTR) &uni_name, 3,
(void *) &buffer);
entriesread = 1;
/* Avoid annoying error messages just because the user hasn't been
found. */
if (rc == NERR_UserNotFound)
return 0;
}
else
rc = NetUserEnum (servername, 3, FILTER_NORMAL_ACCOUNT,