svn commit: samba r19212 - in branches/SAMBA_3_0/source/nsswitch: .
jra at samba.org
jra at samba.org
Tue Oct 10 04:00:43 GMT 2006
Author: jra
Date: 2006-10-10 04:00:42 +0000 (Tue, 10 Oct 2006)
New Revision: 19212
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19212
Log:
Make sure domains marked internal don't do
network queries.
Jeremy.
Modified:
branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c 2006-10-10 02:54:16 UTC (rev 19211)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c 2006-10-10 04:00:42 UTC (rev 19212)
@@ -122,6 +122,12 @@
TALLOC_FREE(domain->check_online_event);
}
+ if (domain->internal) {
+ DEBUG(3,("set_domain_offline: domain %s is internal - logic error.\n",
+ domain->name ));
+ return;
+ }
+
domain->online = False;
/* We only add the timeout handler that checks and
@@ -166,6 +172,12 @@
DEBUG(10,("set_domain_online: called for domain %s\n",
domain->name ));
+ if (domain->internal) {
+ DEBUG(3,("set_domain_offline: domain %s is internal - logic error.\n",
+ domain->name ));
+ return;
+ }
+
if (get_global_winbindd_state_offline()) {
DEBUG(10,("set_domain_online: domain %s remaining globally offline\n",
domain->name ));
@@ -1197,6 +1209,12 @@
{
NTSTATUS result;
+ /* Internal connections never use the network. */
+ if (domain->internal) {
+ domain->initialized = True;
+ return NT_STATUS_OK;
+ }
+
if (connection_ok(domain)) {
if (!domain->initialized) {
set_dc_type_and_flags(domain);
@@ -1237,11 +1255,6 @@
ZERO_STRUCT( ctr );
- if (domain->internal) {
- domain->initialized = True;
- return;
- }
-
if (!connection_ok(domain)) {
return;
}
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_util.c 2006-10-10 02:54:16 UTC (rev 19211)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_util.c 2006-10-10 04:00:42 UTC (rev 19212)
@@ -462,16 +462,18 @@
fstrcpy(domain->dcname, state->request.data.init_conn.dcname);
}
- if (strlen(domain->dcname) > 0) {
- if (!resolve_name(domain->dcname, &ipaddr, 0x20)) {
- DEBUG(2, ("Could not resolve DC name %s for domain %s\n",
- domain->dcname, domain->name));
- return WINBINDD_ERROR;
+ if (!domain->internal) {
+ if (strlen(domain->dcname) > 0) {
+ if (!resolve_name(domain->dcname, &ipaddr, 0x20)) {
+ DEBUG(2, ("Could not resolve DC name %s for domain %s\n",
+ domain->dcname, domain->name));
+ return WINBINDD_ERROR;
+ }
+
+ domain->dcaddr.sin_family = PF_INET;
+ putip((char *)&(domain->dcaddr.sin_addr), (char *)&ipaddr);
+ domain->dcaddr.sin_port = 0;
}
-
- domain->dcaddr.sin_family = PF_INET;
- putip((char *)&(domain->dcaddr.sin_addr), (char *)&ipaddr);
- domain->dcaddr.sin_port = 0;
}
init_dc_connection(domain);
More information about the samba-cvs
mailing list