[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Mon Dec 12 02:24:03 MST 2011


The branch, master has been updated
       via  3d7521c s3:smbd: call sub_set_socket_ids() in smbd_process() again
      from  08019a0 tdb2: don't use TDB2 versions of test tdb files.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3d7521c8abb4080dbff9f687257d05f5f4e45a51
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 12 08:46:26 2011 +0100

    s3:smbd: call sub_set_socket_ids() in smbd_process() again
    
    This got lost in commit b2511a280aa9449123376fd3cbb495dcd1a87dee.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Mon Dec 12 10:23:44 CET 2011 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/process.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 82dd510..073ee39 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2955,6 +2955,7 @@ void smbd_process(struct tevent_context *ev_ctx,
 	socklen_t sa_socklen;
 	struct tsocket_address *local_address = NULL;
 	struct tsocket_address *remote_address = NULL;
+	const char *locaddr = NULL;
 	const char *remaddr = NULL;
 	char *rhost;
 	int ret;
@@ -3013,6 +3014,19 @@ void smbd_process(struct tevent_context *ev_ctx,
 	sconn->local_address = local_address;
 	sconn->remote_address = remote_address;
 
+	if (tsocket_address_is_inet(local_address, "ip")) {
+		locaddr = tsocket_address_inet_addr_string(
+				sconn->local_address,
+				talloc_tos());
+		if (locaddr == NULL) {
+			DEBUG(0,("%s: tsocket_address_inet_addr_string local failed - %s\n",
+				 __location__, strerror(errno)));
+			exit_server_cleanly("tsocket_address_inet_addr_string local failed.\n");
+		}
+	} else {
+		locaddr = "0.0.0.0";
+	}
+
 	if (tsocket_address_is_inet(remote_address, "ip")) {
 		remaddr = tsocket_address_inet_addr_string(
 				sconn->remote_address,
@@ -3051,6 +3065,10 @@ void smbd_process(struct tevent_context *ev_ctx,
 	}
 	sconn->remote_hostname = talloc_move(sconn, &rhost);
 
+	sub_set_socket_ids(remaddr,
+			   sconn->remote_hostname,
+			   locaddr);
+
 	if (!allow_access(lp_hostsdeny(-1), lp_hostsallow(-1),
 			  sconn->remote_hostname,
 			  remaddr)) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list