svn commit: samba r13382 - branches/SAMBA_3_0/source/auth
branches/SAMBA_3_0/source/utils trunk/source/auth trunk/source/utils
jerry at samba.org
jerry at samba.org
Wed Feb 8 04:03:49 GMT 2006
Author: jerry
Date: 2006-02-08 04:03:47 +0000 (Wed, 08 Feb 2006)
New Revision: 13382
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13382
Log:
added server affinity cache stores for 'net rpc join' and trusted domain code
Modified:
branches/SAMBA_3_0/source/auth/auth_domain.c
branches/SAMBA_3_0/source/utils/net.c
branches/SAMBA_3_0/source/utils/net_rpc.c
trunk/source/auth/auth_domain.c
trunk/source/utils/net.c
trunk/source/utils/net_rpc.c
Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_domain.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_domain.c 2006-02-07 23:49:35 UTC (rev 13381)
+++ branches/SAMBA_3_0/source/auth/auth_domain.c 2006-02-08 04:03:47 UTC (rev 13382)
@@ -210,6 +210,10 @@
return nt_status;
}
+ /* store a successful connection */
+
+ saf_store( domain, cli->desthost );
+
ZERO_STRUCT(info3);
/*
Modified: branches/SAMBA_3_0/source/utils/net.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net.c 2006-02-07 23:49:35 UTC (rev 13381)
+++ branches/SAMBA_3_0/source/utils/net.c 2006-02-08 04:03:47 UTC (rev 13382)
@@ -395,6 +395,11 @@
nt_status = connect_to_ipc(&cli, &server_ip, server_name);
}
+ /* store the server in the affinity cache if it was a PDC */
+
+ if ( flags & NET_FLAGS_PDC )
+ saf_store( cli->server_domain, cli->desthost );
+
SAFE_FREE(server_name);
if (NT_STATUS_IS_OK(nt_status)) {
return cli;
Modified: branches/SAMBA_3_0/source/utils/net_rpc.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_rpc.c 2006-02-07 23:49:35 UTC (rev 13381)
+++ branches/SAMBA_3_0/source/utils/net_rpc.c 2006-02-08 04:03:47 UTC (rev 13382)
@@ -5541,6 +5541,10 @@
nt_errstr(nt_status)));
return -1;
}
+
+ /* store who we connected to */
+
+ saf_store( domain_name, cli->desthost );
/*
* Connect to \\server\ipc$ again (this time anonymously)
Modified: trunk/source/auth/auth_domain.c
===================================================================
--- trunk/source/auth/auth_domain.c 2006-02-07 23:49:35 UTC (rev 13381)
+++ trunk/source/auth/auth_domain.c 2006-02-08 04:03:47 UTC (rev 13382)
@@ -210,6 +210,10 @@
return nt_status;
}
+ /* store a successful connection */
+
+ saf_store( domain, cli->desthost );
+
ZERO_STRUCT(info3);
/*
Modified: trunk/source/utils/net.c
===================================================================
--- trunk/source/utils/net.c 2006-02-07 23:49:35 UTC (rev 13381)
+++ trunk/source/utils/net.c 2006-02-08 04:03:47 UTC (rev 13382)
@@ -395,6 +395,11 @@
nt_status = connect_to_ipc(&cli, &server_ip, server_name);
}
+ /* store the server in the affinity cache if it was a PDC */
+
+ if ( flags & NET_FLAGS_PDC )
+ saf_store( cli->server_domain, cli->desthost );
+
SAFE_FREE(server_name);
if (NT_STATUS_IS_OK(nt_status)) {
return cli;
Modified: trunk/source/utils/net_rpc.c
===================================================================
--- trunk/source/utils/net_rpc.c 2006-02-07 23:49:35 UTC (rev 13381)
+++ trunk/source/utils/net_rpc.c 2006-02-08 04:03:47 UTC (rev 13382)
@@ -5541,6 +5541,10 @@
nt_errstr(nt_status)));
return -1;
}
+
+ /* store who we connected to */
+
+ saf_store( domain_name, cli->desthost );
/*
* Connect to \\server\ipc$ again (this time anonymously)
More information about the samba-cvs
mailing list