List Info

Thread: Re: samba and SIOCGIFCONF




Re: samba and SIOCGIFCONF
country flaguser name
United States
2007-12-20 21:28:02
That was me and I don't use samba at all.  I am very
hesitant to add
patches because I don't understand how it ever could have
worked.


From: Greg Troxel <gdtir.bbn.com>
Subject: Re: nmap not working?
To: "Jared D. McNeill" <jmcneillinvisible.ca>
Cc: current-usersnetbsd.org, pkgsrc-usersnetbsd.org
Date: Fri, 09 Nov 2007 19:55:49 -0500

In
pkgsrc/net/samba/work/samba-2.0.26a/source/lib/interfaces.c,
line 123
has a for loop that uses struct ifreq *ifr as an array in
data returned
from SIOCGIFCONF.  This is totally bogus and would have
failed under 4.4BSD.
With the struct sockaddr_storage change, it should work.

If it doesn't work, someone should gdb this loop.

If it works for some, and fails to find interfaces on
systems with many
interfaces, then change buff from 8192 to 32768 or more. 
Each address
is now 144 bytes, the minimum struct ifreq, because
sockaddr_storage is
128 and there's 16 of ifr_name.


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )