Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-08-11 12:59:50 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-08-11 12:59:50 +0400
commit91dd009e81c3f1934a65f46b39b5a653c8be7fa4 (patch)
treeb7b8fa60b33b5a700bec7c8329573e134305990c /winsup/utils/mkpasswd.c
parentb1ce1770ea256a9a2e88c4d0be902322899fe42d (diff)
* 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.
Diffstat (limited to 'winsup/utils/mkpasswd.c')
-rw-r--r--winsup/utils/mkpasswd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c
index 3947309dd..f7c910ba1 100644
--- a/winsup/utils/mkpasswd.c
+++ b/winsup/utils/mkpasswd.c
@@ -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,