Author: jerry Date: 2005-08-16 15:47:52 +0000 (Tue, 16 Aug 2005) New Revision: 9322
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9322 Log: fixing debug log and ensuring that we set the right winbind_methods pointer in get_cache() by requiring that all domain structure be initialized with the set_dc_type_and_flags(). Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd.c branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cache.c trunk/source/nsswitch/winbindd.c trunk/source/nsswitch/winbindd_cache.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/winbindd.c 2005-08-16 13:22:01 UTC (rev 9321) +++ branches/SAMBA_3_0/source/nsswitch/winbindd.c 2005-08-16 15:47:52 UTC (rev 9322) @@ -569,7 +569,7 @@ } if (*(uint32 *)(&state->request) != sizeof(state->request)) { - DEBUG(0,("process_loop: Invalid request size received: %d\n", + DEBUG(0,("request_len_recv: Invalid request size received: %d\n", *(uint32 *)(&state->request))); state->finished = True; return; Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2005-08-16 13:22:01 UTC (rev 9321) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2005-08-16 15:47:52 UTC (rev 9322) @@ -101,6 +101,11 @@ { struct winbind_cache *ret = wcache; + /* we have to know what type of domain we are dealing with first */ + + if ( !domain->initialized ) + set_dc_type_and_flags( domain ); + if (!domain->backend) { extern struct winbindd_methods reconnect_methods; switch (lp_security()) { @@ -365,9 +370,6 @@ /* important! make sure that we know if this is a native mode domain or not */ - if ( !domain->initialized ) - set_dc_type_and_flags( domain ); - status = domain->backend->sequence_number(domain, &domain->sequence_number); if (!NT_STATUS_IS_OK(status)) { Modified: branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd.c =================================================================== --- branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd.c 2005-08-16 13:22:01 UTC (rev 9321) +++ branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd.c 2005-08-16 15:47:52 UTC (rev 9322) @@ -569,7 +569,7 @@ } if (*(uint32 *)(&state->request) != sizeof(state->request)) { - DEBUG(0,("process_loop: Invalid request size received: %d\n", + DEBUG(0,("request_len_recv: Invalid request size received: %d\n", *(uint32 *)(&state->request))); state->finished = True; return; Modified: branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cache.c =================================================================== --- branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cache.c 2005-08-16 13:22:01 UTC (rev 9321) +++ branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cache.c 2005-08-16 15:47:52 UTC (rev 9322) @@ -101,6 +101,11 @@ { struct winbind_cache *ret = wcache; + /* we have to know what type of domain we are dealing with first */ + + if ( !domain->initialized ) + set_dc_type_and_flags( domain ); + if (!domain->backend) { extern struct winbindd_methods reconnect_methods; switch (lp_security()) { @@ -365,9 +370,6 @@ /* important! make sure that we know if this is a native mode domain or not */ - if ( !domain->initialized ) - set_dc_type_and_flags( domain ); - status = domain->backend->sequence_number(domain, &domain->sequence_number); if (!NT_STATUS_IS_OK(status)) { Modified: trunk/source/nsswitch/winbindd.c =================================================================== --- trunk/source/nsswitch/winbindd.c 2005-08-16 13:22:01 UTC (rev 9321) +++ trunk/source/nsswitch/winbindd.c 2005-08-16 15:47:52 UTC (rev 9322) @@ -556,7 +556,7 @@ } if (*(uint32 *)(&state->request) != sizeof(state->request)) { - DEBUG(0,("process_loop: Invalid request size received: %d\n", + DEBUG(0,("request_len_recv: Invalid request size received: %d\n", *(uint32 *)(&state->request))); state->finished = True; return; Modified: trunk/source/nsswitch/winbindd_cache.c =================================================================== --- trunk/source/nsswitch/winbindd_cache.c 2005-08-16 13:22:01 UTC (rev 9321) +++ trunk/source/nsswitch/winbindd_cache.c 2005-08-16 15:47:52 UTC (rev 9322) @@ -101,6 +101,11 @@ { struct winbind_cache *ret = wcache; + /* we have to know what type of domain we are dealing with first */ + + if ( !domain->initialized ) + set_dc_type_and_flags( domain ); + if (!domain->backend) { extern struct winbindd_methods reconnect_methods; switch (lp_security()) { @@ -365,9 +370,6 @@ /* important! make sure that we know if this is a native mode domain or not */ - if ( !domain->initialized ) - set_dc_type_and_flags( domain ); - status = domain->backend->sequence_number(domain, &domain->sequence_number); if (!NT_STATUS_IS_OK(status)) {
