BUGFIX: lib/interface.c - SAMBA 2.0.6.

John E. Malmberg wb8tyw at qsl.net
Wed Nov 8 06:51:42 GMT 2000

In the module lib/interface.c there is a bug in the routine

It calls the routine get_interfaces() to determine if any new interfaces
have been added.

If the underlying operating system and TCP/IP program do not provide this
information the routine get_interfaces returns -1.

This is not checked in the module interfaces_changed, and results in a
memcmp being called with -1 bytes.

The fix is to ensure that the value for n is > 0.  If n <= 0, then false
should be returned.

************ NEW
  237           if ((n > 0) && (n != total_probed ||
  238               memcmp(ifaces, probed_ifaces, sizeof(ifaces[0])*n))) {
  239                   return True;
****** OLD
  237           if (n != total_probed ||
  238               memcmp(ifaces, probed_ifaces, sizeof(ifaces[0])*n)) {
  239                   return True;

Number of difference sections found: 1
Number of difference records found: 2

OpenVMS VAX 7.1
UCX 4.2 (Compaq TCP/IP)
DEC C 6.2

More information about the samba-technical mailing list