diff options
author | Dave Korn <dave.korn.cygwin@gmail.com> | 2007-08-31 04:39:41 +0400 |
---|---|---|
committer | Dave Korn <dave.korn.cygwin@gmail.com> | 2007-08-31 04:39:41 +0400 |
commit | d848b3419f466800f9e266d96033dc2773a19908 (patch) | |
tree | 3dc996d792707c8806ebc8c2093d545751863485 /winsup | |
parent | b440439a899768a7fce0f1c414f86f9fc1473553 (diff) |
2007-08-31 Dave Korn <dave.korn@artimi.com>
* mkgroup.c (enum_groups): Use MAX_PREFERRED_LENGTH in netgroupenum
call so that it will automatically size returned buffer sufficiently.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/mkgroup.c | 2 |
2 files changed, 6 insertions, 1 deletions
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 <dave.korn@artimi.com> + + * 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 <dave.korn@artimi.com> * 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) { |