[PATCH 1/3] Make listen() on an unbound UNIX socket return EDESTADDRREQ.

2016-03-03 Thread Ed Schouten
for condition this is all right, POSIX requires that two different error codes are returned: EINVAL if already connected and EDESTADDRREQ if not bound. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/listen.html Signed-off-by: Ed Schouten --- net/unix/af_unix.c | 4 ++-- 1

[PATCH 0/3] UNIX sockets: POSIX conformance of errno's

2016-03-03 Thread Ed Schouten
ng a patch to the Linux kernel, so if there's anything wrong with the way I submitted these patches, just let me know. Thanks, Ed Ed Schouten (3): Make listen() on an unbound UNIX socket return EDESTADDRREQ. Let open() on a UNIX socket return EOPNOTSUPP. Return ENOTCONN when trying

[PATCH 3/3] Return ENOTCONN when trying to recv() on an unconnected UNIX socket.

2016-03-03 Thread Ed Schouten
-off-by: Ed Schouten --- net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index d810815..824dd63 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2283,7 +2283,7 @@ static int unix_stream_read_generic(struct

[PATCH 2/3] Let open() on a UNIX socket return EOPNOTSUPP.

2016-03-03 Thread Ed Schouten
ences: http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html http://austingroupbugs.net/view.php?id=943 Signed-off-by: Ed Schouten --- fs/inode.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/fs/inode.c b/fs/inode.c index 69b8b52..6e63ca7 100644 ---