Please help us test the behavior of different Unices

Justus Winter justus at g10code.com
Wed Mar 1 14:22:08 CET 2017


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.


Thanks,
Justus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: </pipermail/attachments/20170301/361719dd/attachment-0001.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-unix-sockets.c
Type: text/x-csrc
Size: 4114 bytes
Desc: The test program.
URL: </pipermail/attachments/20170301/361719dd/attachment-0001.c>


More information about the Gnupg-devel mailing list