From 5a625821622d11060b07fc7a31b9265fa01eed9b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 18 Aug 2008 08:58:21 +0000 Subject: * mkgroup.c (enum_local_groups): Return failure if looking for a single group succeeded. Add comment. --- winsup/utils/mkgroup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/utils/mkgroup.c') diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c index e2d73aa4d..3034e457a 100644 --- a/winsup/utils/mkgroup.c +++ b/winsup/utils/mkgroup.c @@ -454,7 +454,10 @@ skip_group: } while (rc == ERROR_MORE_DATA); - return 0; + /* Return -1 if the single group we're looking for has been found here to + avoid calling enum_groups for the same group, thus avoiding a spurious + error message "group name could not be found" in enum_groups. */ + return disp_groupname && entriesread ? -1 : 0; } static void -- cgit v1.2.3