[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed Jul 24 06:38:02 MDT 2013


The branch, master has been updated
       via  077dfd0 s4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in in unixdom_get_my_addr()
      from  a7801db docs-xml: Remove obsolete swat manpage and references.

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


- Log -----------------------------------------------------------------
commit 077dfd0a89a854c21b91b0f871d034fd9fe82a9a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 24 10:19:26 2013 +1200

    s4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in in unixdom_get_my_addr()
    
    This caused crashes in _tsocket_address_bsd_from_sockaddr() when we
    read past the end of the allocation.
    
    (similar to commit e9ae36e9683372b86f1efbd29904722a33fea083)
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10042
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Jul 24 14:37:43 CEST 2013 on sn-devel-104

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

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


Changeset truncated at 500 lines:

diff --git a/source4/lib/socket/socket_unix.c b/source4/lib/socket/socket_unix.c
index 3aa5440..6876e39 100644
--- a/source4/lib/socket/socket_unix.c
+++ b/source4/lib/socket/socket_unix.c
@@ -362,7 +362,7 @@ static struct socket_address *unixdom_get_peer_addr(struct socket_context *sock,
 
 static struct socket_address *unixdom_get_my_addr(struct socket_context *sock, TALLOC_CTX *mem_ctx)
 {
-	struct sockaddr_in *local_addr;
+	struct sockaddr_un *local_addr;
 	socklen_t len = sizeof(*local_addr);
 	struct socket_address *local;
 	int ret;
@@ -373,7 +373,7 @@ static struct socket_address *unixdom_get_my_addr(struct socket_context *sock, T
 	}
 	
 	local->family = sock->backend_name;
-	local_addr = talloc(local, struct sockaddr_in);
+	local_addr = talloc(local, struct sockaddr_un);
 	if (!local_addr) {
 		talloc_free(local);
 		return NULL;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list