On Thu, Aug 30, 2007 at 05:44:39PM +0100, Dave Korn wrote: >On 30 August 2007 01:35, Brian Egge wrote: > >> When running mkgroup after installing cygwin I receive the following >> error: >> >> $ mkgroup -l -d > /etc/group >> mkgroup (366): [2123] The API return buffer is too small. >> >> I suspect this is due to the large number of groups our organization >> has. > > Very strange. All the other netenum* calls use MAX_PREFERRED_LENGTH. Can't >see why this one would be omitted, but the fix is basically obvious. > > Tested by turning down the size to 128 so I could reproduce the error on my >system here, then using MAX_PREFERRED_LENGTH and watching it no longer fail. > > >winsup/utils/ChangeLog: > > * mkgroup.c (enum_groups): Use MAX_PREFERRED_LENGTH in netgroupenum > call so that it will automatically size returned buffer sufficiently.
Looks good to me. Please check it in, Dave. Thanks for the patch. cgf
