diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 66936fd59..47656e90a 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2007-08-31 Dave Korn + + * mkgroup.c (enum_groups): Use MAX_PREFERRED_LENGTH in netgroupenum + call so that it will automatically size returned buffer sufficiently. + 2007-08-03 Dave Korn * Makefile.in (cygcheck.exe): Add bloda.o as prerequisite, adjusting diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c index 376162963..1926d9156 100644 --- a/winsup/utils/mkgroup.c +++ b/winsup/utils/mkgroup.c @@ -350,7 +350,7 @@ enum_groups (LPWSTR servername, int print_sids, int print_users, int id_offset, entriesread=1; } else - rc = netgroupenum (servername, 2, (void *) & buffer, 1024, + rc = netgroupenum (servername, 2, (void *) & buffer, MAX_PREFERRED_LENGTH, &entriesread, &totalentries, &resume_handle); switch (rc) {