[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2167-g03dd06d

Andrew Tridgell tridge at samba.org
Tue Jun 9 03:34:42 GMT 2009


The branch, master has been updated
       via  03dd06de9ae7b3692fd2ab141c0522abacbaec31 (commit)
      from  4b0658d4486d60c82c989ed0b6c806dfc45edbac (commit)

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


- Log -----------------------------------------------------------------
commit 03dd06de9ae7b3692fd2ab141c0522abacbaec31
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Jun 9 13:33:09 2009 +1000

    fixed socket wrapper to determine family from the right structure
    
    In convert_in_un_remote() the socket family can be accessed either as
    si->family or inaddr->sa_family. We were using the si->family to
    determine how to cast the inaddr structure, but if si->family !=
    inaddr->sa_family then we will incorrectly be casting a in6 structure
    as in4 or vice-versa.

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

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c
index 071060c..8563400 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -348,7 +348,7 @@ static int convert_in_un_remote(struct socket_info *si, const struct sockaddr *i
 
 	if (bcast) *bcast = 0;
 
-	switch (si->family) {
+	switch (inaddr->sa_family) {
 	case AF_INET: {
 		const struct sockaddr_in *in = 
 		    (const struct sockaddr_in *)inaddr;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list