diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-08-18 12:58:21 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-08-18 12:58:21 +0400 |
commit | 5a625821622d11060b07fc7a31b9265fa01eed9b (patch) | |
tree | a513244245fc7a9b5f6e8ee97e2d531b99bfd636 /winsup/utils | |
parent | 096df1774b9f4def3d04278b3aab51f065039e34 (diff) |
* mkgroup.c (enum_local_groups): Return failure if looking for a single
group succeeded. Add comment.
Diffstat (limited to 'winsup/utils')
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/mkgroup.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index d38ec43d7..6978f95e7 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,5 +1,10 @@ 2008-08-18 Corinna Vinschen <corinna@vinschen.de> + * mkgroup.c (enum_local_groups): Return failure if looking for a single + group succeeded. Add comment. + +2008-08-18 Corinna Vinschen <corinna@vinschen.de> + * mkgroup.c (main): Keep correctly track of optional arguments. * mkpasswd.c (main): Ditto. 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 |