Linux Container Development
 help / color / mirror / Atom feed
From: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
To: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
	ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org,
	benjamin.thery-6ktuUTfB/bM@public.gmane.org
Subject: Re: [patch 0/1][NETNS49] Make af_unix autobind per namespace
Date: Tue, 02 Oct 2007 17:31:52 +0200	[thread overview]
Message-ID: <47026468.5030400@fr.ibm.com> (raw)
In-Reply-To: <20071002151846.827206013-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>

Daniel Lezcano wrote:
> The following patch change autobind fonction to use the ordernum
> from the network namespace instead of using the local static variable.
> 

I forgot to add this trivial program which does autobind.

---


#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>

int main(int argc, char* argv[])
{
         int fd;
         struct sockaddr_un addr;

         fd = socket(PF_UNIX, SOCK_DGRAM, 0);
         if (fd == -1) {
                 perror("socket");
                 return 1;
         }

         memset(&addr, 0, sizeof(addr));

         addr.sun_family = AF_UNIX;
         strcpy(addr.sun_path, "");

         if (bind(fd, &addr, sizeof(short))) {
                 perror("bind");
                 return 1;
         }

         return 0;
}

  parent reply	other threads:[~2007-10-02 15:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-02 15:18 [patch 0/1][NETNS49] Make af_unix autobind per namespace Daniel Lezcano
2007-10-02 15:18 ` [patch 1/1][NETNS49] Make af_unix autobind per network namespace Daniel Lezcano
     [not found] ` <20071002151846.827206013-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>
2007-10-02 15:31   ` Daniel Lezcano [this message]
2007-10-02 17:18   ` [patch 0/1][NETNS49] Make af_unix autobind per namespace Eric W. Biederman
     [not found]     ` <m1fy0tjv04.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-10-02 20:51       ` Daniel Lezcano
     [not found]         ` <4702AF67.1010707-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-10-02 22:43           ` Eric W. Biederman
     [not found]             ` <m1myv1gmsl.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-10-03  8:35               ` Daniel Lezcano
2007-10-03  8:14           ` Denis V. Lunev
     [not found]             ` <47034F4F.5000901-3ImXcnM4P+0@public.gmane.org>
2007-10-03 13:11               ` Cedric Le Goater
     [not found]                 ` <47039510.7040001-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-10-03 14:36                   ` Eric W. Biederman
     [not found]                     ` <m1przwe03e.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-10-03 15:34                       ` Cedric Le Goater
2007-10-03  8:11       ` Denis V. Lunev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47026468.5030400@fr.ibm.com \
    --to=dlezcano-nmtc/0zbporqt0dzr+alfa@public.gmane.org \
    --cc=benjamin.thery-6ktuUTfB/bM@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox