[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-323-gad9f14b
Jeremy Allison
jra at samba.org
Fri Nov 16 01:59:52 GMT 2007
The branch, v3-2-test has been updated
via ad9f14b6dcb05e8fa68b51ff26ff40fc445a4631 (commit)
from 11bcdf780e164659b89a66e24edc27e89da7619a (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit ad9f14b6dcb05e8fa68b51ff26ff40fc445a4631
Author: Jeremy Allison <jra at samba.org>
Date: Thu Nov 15 17:59:12 2007 -0800
Fix bug noticed by kukks <linux at kukkukk.com> where
ip list didn't match namelist added to subnetdb.
Could cause bogus IP addresses to be reported for
the __SAMBA__ name.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/nmbd/nmbd_namelistdb.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/nmbd/nmbd_namelistdb.c b/source/nmbd/nmbd_namelistdb.c
index ae5f766..f9cbcf4 100644
--- a/source/nmbd/nmbd_namelistdb.c
+++ b/source/nmbd/nmbd_namelistdb.c
@@ -192,6 +192,10 @@ bool add_name_to_subnet( struct subnet_record *subrec,
struct name_record *namerec;
time_t time_now = time(NULL);
+ if (num_ips == 0) {
+ return false;
+ }
+
namerec = SMB_MALLOC_P(struct name_record);
if( NULL == namerec ) {
DEBUG( 0, ( "add_name_to_subnet: malloc fail.\n" ) );
@@ -504,8 +508,12 @@ void add_samba_names_to_subnet( struct subnet_record *subrec )
return;
}
- for( bcast_subrecs = FIRST_SUBNET, i = 0; bcast_subrecs; bcast_subrecs = NEXT_SUBNET_EXCLUDING_UNICAST(bcast_subrecs), i++ )
+ for( bcast_subrecs = FIRST_SUBNET, i = 0; bcast_subrecs &&
+ i < num_ips;
+ bcast_subrecs = NEXT_SUBNET_EXCLUDING_UNICAST(bcast_subrecs), i++ ) {
iplist[i] = bcast_subrecs->myip;
+ }
+ num_ips = i;
}
add_name_to_subnet(subrec,"*",0x0,samba_nb_type, PERMANENT_TTL,
--
Samba Shared Repository
More information about the samba-cvs
mailing list