only for the paranoid---getgroups(3) testcase
Roland Illig
roland.illig at gmx.de
Fri Jul 22 21:02:35 UTC 2005
Here's a little testcase that can be used for confidence tests and for
portability tests.
You can define FIRST_GETGROUPS_FAILS and/or SECOND_GETGROUPS_FAILS and
see what's the result.
In addition to the code used in utilunix.c, there's a check that the
result of the second call to getgroups() is not greater than the result
of the first call.
There is no check whether the getgroups() function produces a buffer
overflow. This is left as an excercise to the reader.
Roland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ggtest.c
Type: text/x-csrc
Size: 930 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20050722/7b013ec7/attachment.c>
More information about the mc-devel
mailing list