[distcc] [PATCH] IPv6 ACLs

Bob Ham rah at bash.sh
Tue Jul 21 03:15:18 MDT 2009


On Mon, 2009-07-20 at 22:23 -0400, Fergus Henderson wrote:

> Oh, I see that the old code that this is replacing didn't check the
> return value of strdup() either.

Indeed, both of the issues you raised were a continuation of the modus
operandi.  As you noted, the return value of strdup() was not checked.
Also, the following non-standard C was used in srvnet.c:

-            const in_addr_t *a4;
...
-                a4 = (const in_addr_t *) &a6->s6_addr[12];


Regardless, I've updated the patch to correct these issues.  I've also
made two more updates.  One is a fix to ensure the maximum bit mask size
is set according to the address family and not just whether RFC2553
support is enabled.

The other, slightly more worrying update modifies the non-RFC2553 code
to use inet_aton() instead of inet_pton().  The inet_pton() function is
defined in RFC2553.  This is worrying because it means that people have
been compiling distcc without RFC2553 support enabled but still using a
function defined by that RFC.  The fact that this state has continued
without being noticed previously calls into question the value of
maintaining non-RFC2553 code at all.


-- 
Bob Ham <rah at bash.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: distcc-v6-acl-2.patch
Type: text/x-patch
Size: 14308 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/distcc/attachments/20090721/1a863b5d/attachment.bin>


More information about the distcc mailing list