[PATCH v2 0/5] Support opening an AF_LOCAL socket with O_PATH

Ken Brown kbrown@cornell.edu
Wed Jan 29 17:31:00 GMT 2020

On 1/29/2020 12:22 PM, Ken Brown wrote:
> I'll follow up with the program I used to test this patch series.


$ gcc -Wall -o o_path_socket_test o_path_socket_test.c

$ ./o_path_socket_test.exe
The following calls should fail with EBADF:
read: OK
write: OK
fchmod: OK
fchown: OK
ioctl: OK
fgetxattr: OK
mmap: OK
sockatmark: OK

The following calls should fail with ENOTSOCK:
sendto: OK
recvfrom: OK
setsockopt: OK
getsockopt: OK
getpeereid: OK
connect: OK
accept: OK
accept4: OK
bind: OK
getsockname: OK
listen: OK
shutdown: OK
getpeername: OK
recv: OK
send: OK
recvmsg: OK
sendmsg: OK
bindresvport_sa: OK
bindresvport with NULL arg: OK
bindresvport with valid sin arg: OK

The following call should fail with EAFNOSUPPORT:
bindresvport with invalid sin arg: OK

The following calls should succeed:
fstat: OK
fstatvfs: OK
fcntl_dup: OK
fcntl_getfl: OK
fcntl_setfl: OK
fcntl_getfd: OK
fcntl_setfd: OK
close: OK
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: o_path_socket_test.c
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20200129/2ccc1b82/attachment.c>

More information about the Cygwin-patches mailing list