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
them without thinking about permissions or in chroot). In netstat
unix 2 [ ACC ] STREAM LISTENING 23813 @funnysock
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 ?
This is the same code i made after you suggestion, but in the url
parsing
code (ngx_parse_unix_domain_url), ngx_cpystrn() is used and it takes
‘\0’
in account.
Changing ngx_cpystrn to not use \0 fixes the problem. Probably
substituting it with ngx_memcpy is the way to go.
I wonder if this patch is included in the main code?
I could not use unix domain sockets in abstract namespace, like this:
unix:@socket_name
nor:
unix:\0socket_name
in nginx/1.3.6
What are the chances of include this patch, where is the problem?
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.