The Samba-Bugzilla – Attachment 8604 Details for
Bug 9697
DsReplicaGetInfo fails due to sendto() EMSGSIZE error on UNIX domain socket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
required patch from master to cherry-pick the fix
0001-s4-socket-Make-sure-unix-socket-addresses-are-null-t.patch (text/plain), 1.96 KB, created by
Andrew Bartlett
on 2013-03-03 09:41:31 UTC
(
hide
)
Description:
required patch from master to cherry-pick the fix
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2013-03-03 09:41:31 UTC
Size:
1.96 KB
patch
obsolete
>From 38fdf59aeb823c96e828531ab927567c25a5b9e7 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Mon, 10 Dec 2012 17:14:12 +0100 >Subject: [PATCH 1/2] s4-socket: Make sure unix socket addresses are null > terminated. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Günther Deschner <gd@samba.org> >(cherry picked from commit 7dd13503c0919766ecf3c8f5f48cda72aae8ac73) >--- > source4/lib/socket/socket_unix.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/source4/lib/socket/socket_unix.c b/source4/lib/socket/socket_unix.c >index 2909ecc..4755e79 100644 >--- a/source4/lib/socket/socket_unix.c >+++ b/source4/lib/socket/socket_unix.c >@@ -113,7 +113,7 @@ static NTSTATUS unixdom_connect(struct socket_context *sock, > > ZERO_STRUCT(srv_addr); > srv_addr.sun_family = AF_UNIX; >- strncpy(srv_addr.sun_path, srv_address->addr, sizeof(srv_addr.sun_path)); >+ snprintf(srv_addr.sun_path, sizeof(srv_addr.sun_path), "%s", srv_address->addr); > > ret = connect(sock->fd, (const struct sockaddr *)&srv_addr, sizeof(srv_addr)); > } >@@ -148,8 +148,8 @@ static NTSTATUS unixdom_listen(struct socket_context *sock, > > ZERO_STRUCT(my_addr); > my_addr.sun_family = AF_UNIX; >- strncpy(my_addr.sun_path, my_address->addr, sizeof(my_addr.sun_path)); >- >+ snprintf(my_addr.sun_path, sizeof(my_addr.sun_path), "%s", my_address->addr); >+ > ret = bind(sock->fd, (struct sockaddr *)&my_addr, sizeof(my_addr)); > } > if (ret == -1) { >@@ -278,8 +278,8 @@ static NTSTATUS unixdom_sendto(struct socket_context *sock, > > ZERO_STRUCT(srv_addr); > srv_addr.sun_family = AF_UNIX; >- strncpy(srv_addr.sun_path, dest->addr, sizeof(srv_addr.sun_path)); >- >+ snprintf(srv_addr.sun_path, sizeof(srv_addr.sun_path), "%s", dest->addr); >+ > len = sendto(sock->fd, blob->data, blob->length, 0, > (struct sockaddr *)&srv_addr, sizeof(srv_addr)); > } >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 9697
:
8603
| 8604 |
8605
|
8606
|
8607