Welcome! Log In Create A New Profile

Advanced

Re: [PATH] support for UNIX socket in abstract namespace

All files from this thread

File Name File Size   Posted by Date  
unix_abstract.patch 1 KB open | download roberto 05/23/2011 Read message
May 23, 2011 01:52PM
On Mon, May 23, 2011 at 07:42:02PM +0200, Roberto De Ioris wrote:
>
> > On Mon, May 23, 2011 at 04:18:30PM +0200, Roberto De Ioris wrote:
> >> (Warning this is Linux only)
> >>
> >> Hi all, the attached path adds support for unix socket in abstract
> >> namespace.
> >> They are special sockets without filesystem correspondence (so you can
> >> use
> >> them without thinking about permissions or in chroot). In netstat they
> >> are
> >> reported with a '@' prefix.
> >>
> >> For example (using uWSGI):
> >>
> >> uwsgi -s @funnysock
> >>
> >> netstat -l
> >>
> >> unix 2 [ ACC ] STREAM LISTENING 23813 @funnysock
> >>
> >> After applying the patch you can connect to it with
> >>
> >> uwsgi_pass unix:@funnysock;
> >>
> >> I hope it can be useful
> >
> > Thank you for the feature. I think it's better to allow nginx
> > configuration
> > parser to support "\0" as binary 0. Then this socket may be set as
> >
> > uwsgi_pass unix:\0funnysock;
> >
>
> I fear it will require changes changes as 0 being the token delimeter in
> config parsing :(

Could you test the attached patch ?


--
Igor Sysoev
Index: src/core/ngx_conf_file.c
===================================================================
--- src/core/ngx_conf_file.c (revision 3923)
+++ src/core/ngx_conf_file.c (working copy)
@@ -714,6 +714,11 @@
*dst++ = '\n';
src += 2;
continue;
+
+ case '0':
+ *dst++ = '\0';
+ src += 2;
+ continue;
}

}
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

[PATH] support for UNIX socket in abstract namespace Attachments

roberto May 23, 2011 10:20AM

Re: [PATH] support for UNIX socket in abstract namespace

Igor Sysoev May 23, 2011 12:36PM

Re: [PATH] support for UNIX socket in abstract namespace

roberto May 23, 2011 01:44PM

Re: [PATH] support for UNIX socket in abstract namespace

roberto May 23, 2011 01:46PM

Re: [PATH] support for UNIX socket in abstract namespace

Igor Sysoev May 23, 2011 01:50PM

Re: [PATH] support for UNIX socket in abstract namespace

Igor Sysoev May 23, 2011 01:52PM

Re: [PATH] support for UNIX socket in abstract namespace

roberto May 23, 2011 02:20PM

Re: [PATH] support for UNIX socket in abstract namespace

Igor Sysoev May 23, 2011 02:38PM

Re: [PATH] support for UNIX socket in abstract namespace

nri.pl September 17, 2012 03:05AM

Re: [PATH] support for UNIX socket in abstract namespace

Pavel Murzakov September 06, 2017 05:20PM

Re: [PATH] support for UNIX socket in abstract namespace

Maxim Dounin September 07, 2017 09:34AM

Re: [PATH] support for UNIX socket in abstract namespace

Pavel Murzakov September 07, 2017 10:03AM

Re: [PATH] support for UNIX socket in abstract namespace

Maxim Dounin September 07, 2017 11:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 191
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready