Please help us test the behavior of different Unices

Patrick Brunschwig patrick at enigmail.net
Wed Mar 1 15:44:01 CET 2017


On 01.03.17 14:22, Justus Winter wrote:
> Hello,
> 
> I have written a small test program and I would like to ask you to run
> it on UNIX platforms that you care about.  (Care as in you want to be
> able to run GnuPG on it the future).
> 
> This program tests how different UNIX implementations cope with UNIX
> domain sockets being created in paths that exceed sizeof (struct
> sockaddr_un.sun_path).
> 
> The hypothesis is that it is okay to create sockets there, as long as
> one uses relative paths for bind and connect.
> 
> Building and running this program should be as easy as:
> 
>   % make test-unix-sockets && ./test-unix-sockets
> 
> This is an example output:
> 
> System: GNU:0.9:GNU-Mach 1.8-686-dbg/Hurd-0.9
> sizeof addr.sun_path: 108
> Running test with strlen (cwd): 22, name: '/tmp/test-unix-sockets/socket'
>   getsockname returned '', addrlen: 3
> Running test with strlen (cwd): 22, name: 'socket'
>   getsockname returned '', addrlen: 3
> Running test with strlen (cwd): 130, name: 'socket'
>   getsockname returned '', addrlen: 3
> Running test with strlen (cwd): 1102, name: 'socket'
>   getsockname returned '', addrlen: 3
> 
> Please post the results here.

macOS Sierra (10.12):

System: Darwin:16.4.0:Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21
PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64
sizeof addr.sun_path: 104
Running test with strlen (cwd): 22, name: '/tmp/test-unix-sockets/socket'
  getsockname returned '/tmp/test-unix-sockets/socket', addrlen: 106
Running test with strlen (cwd): 22, name: 'socket'
  getsockname returned 'socket', addrlen: 106
Running test with strlen (cwd): 126, name: 'socket'
  getsockname returned 'socket', addrlen: 106
Running test with strlen (cwd): 1062, name: 'socket'
  getsockname returned 'socket', addrlen: 106

-Patrick



More information about the Gnupg-devel mailing list