lkml.org 
[lkml]   [2002]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Unix-domain sockets - abstract addresses
Hi,

On Thu, 8 Aug 2002 kuznet@ms2.inr.ac.ru wrote:
> - msg->msg_namelen = sizeof(short);
> + msg->msg_namelen = 0;

This version is for 2.5:

--- linus-2.5/net/unix/af_unix.c Mon Aug 5 12:02:05 2002
+++ thunder-2.5/net/unix/af_unix.c Thu Aug 8 18:28:49 2002
@@ -79,6 +79,8 @@
* with BSD names.
*/

+#undef unix /* KBUILD_MODNAME */
+
#include <linux/module.h>
#include <linux/config.h>
#include <linux/kernel.h>
@@ -1400,7 +1402,9 @@
{
struct unix_sock *u = unix_sk(sk);

- msg->msg_namelen = sizeof(short);
+ // msg->msg_namelen = sizeof(short);
+ msg->msg_namelen = 0;
+
if (u->addr) {
msg->msg_namelen = u->addr->len;
memcpy(msg->msg_name, u->addr->name, u->addr->len);
Thunder
--
.-../../-./..-/-..- .-./..-/.-.././.../.-.-.-

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.044 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site