Re: Unix-domain sockets - abstract addresses

From: Thunder from the hill (thunder@lightweight.ods.org)
Date: Thu Aug 08 2002 - 19:29:30 EST


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/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:18 EST