solution to problem of winbindd not able to find Domain controller

Kuldeep Nagarkar meet_kd at lycos.com
Wed Apr 23 12:31:15 GMT 2003


Hi,

I have come across a problem in which winbindd
is not able to contact the domain controller when
it is started. This happens when the smb.conf
'security' parameter is set to "domain"

Investigation led to the following code piece:
In file winbindd.c
main()
->winbind_setup_common()
->init_domain_list()
->add_trusted_domain()
->cm_check_for_native_mode_win2k()
->cm_open_connection()
->cm_get_dc_name()
->cm_rpc_find_dc()
->get_dc_list()
    In the final loop in which we determine the count
to be returned, the final assignment is
*count = local_count;
So if there is a single valid entry without any holes
the local_count gets initialized to incorrect value.
i.e.
local_count = hole_index;
And hole_index is -1!!!!!
So the procedure fails....


The one of the probable fix is to advance the hole_index as we iterate over the local_count.
Hence,
... <snip>...
i = 0;
while (i < local_count) {
     if (!is_zero(return_iplist[i])) {
          i++;
          hole_index = i;
          continue;
     }

    .... <snip>....
}
... <snip>...



thanks,
Kuldeep




____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005


More information about the samba-technical mailing list