diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-08-11 12:59:50 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-08-11 12:59:50 +0400 |
commit | 91dd009e81c3f1934a65f46b39b5a653c8be7fa4 (patch) | |
tree | b7b8fa60b33b5a700bec7c8329573e134305990c /winsup/utils/mkpasswd.c | |
parent | b1ce1770ea256a9a2e88c4d0be902322899fe42d (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.c | 4 |
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, |