FW: mkgroup (366): [2123] The API return buffer is too small.
Dave Korn
dave.korn@artimi.com
Thu Aug 30 16:44:00 GMT 2007
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.
cheers,
DaveK
--
Can't think of a witty .sigline today....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkgroup-bufsize-patch.diff
Type: application/octet-stream
Size: 623 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20070830/3ff4b17d/attachment.obj>
More information about the Cygwin-patches
mailing list