UNIX domain sockets on nullfs still broken?

Ivan Voras ivoras at freebsd.org
Mon Nov 30 14:43:19 UTC 2009


xorquewasp at googlemail.com wrote:
> jackd (audio/jack) creates a directory in /tmp with a UNIX domain socket
> in it. Clients connect to this socket to communicate with the server.
> 
> $ jackd -d oss -r 44100 -p 128
> $ ls -alF /tmp/jack-11001/default
> total 4
> drwx------  2 xw  wheel  512 30 Nov 14:19 ./
> drwx------  3 xw  wheel  512 30 Nov 14:19 ../
> prw-r--r--  1 xw  wheel    0 30 Nov 14:19 jack-ack-fifo-54211-0|
> prw-r--r--  1 xw  wheel    0 30 Nov 14:19 jack-ack-fifo-54211-1|
> prw-r--r--  1 xw  wheel    0 30 Nov 14:19 jack-ack-fifo-54211-2|
> srwxr-xr-x  1 xw  wheel    0 30 Nov 14:19 jack_0=
> srwxr-xr-x  1 xw  wheel    0 30 Nov 14:19 jack_ack_0=
> 
> $ sudo mount_nullfs /tmp/ /jail/k4m/tmp
> 
> In the jail:
> 
> k4m$ ls -alF /tmp/jack-11001/default
> drwx------  2 xw  wheel  512 30 Nov 14:19 ./
> drwx------  3 xw  wheel  512 30 Nov 14:19 ../
> prw-r--r--  1 xw  wheel    0 30 Nov 14:19 jack-ack-fifo-54211-0|
> prw-r--r--  1 xw  wheel    0 30 Nov 14:19 jack-ack-fifo-54211-1|
> prw-r--r--  1 xw  wheel    0 30 Nov 14:19 jack-ack-fifo-54211-2|
> srwxr-xr-x  1 xw  wheel    0 30 Nov 14:19 jack_0=
> srwxr-xr-x  1 xw  wheel    0 30 Nov 14:19 jack_ack_0=
> 
> k4m$ ktrace jack_showtime
> jack server not running?
> 
> k4m$ kdump | grep '/tmp/jack-11001'
>  76030 initial thread STRU  struct sockaddr { AF_LOCAL, /tmp/jack-11001/default/jack_0 }
>  76030 initial thread NAMI  "/tmp/jack-11001/default/jack_0"
>  76030 initial thread RET   connect -1 errno 61 Connection refused

I would expect to see this result from the jail since it's obviously a 
Bad Idea, but does it work from the same (host) machine without the jail 
in between (i.e. just the nullfs, no jails)?



More information about the freebsd-hackers mailing list