diff src/lib/net.c @ 16806:07cc79e0041d

net_listen_unix(): If path is too long, return EOVERFLOW instead of EINVAL.
author Timo Sirainen <tss@iki.fi>
date Sun, 22 Sep 2013 02:24:05 +0300
parents 58be84a381e5
children 6a814345f16c
line wrap: on
line diff
--- a/src/lib/net.c	Sun Sep 22 02:23:30 2013 +0300
+++ b/src/lib/net.c	Sun Sep 22 02:24:05 2013 +0300
@@ -461,7 +461,7 @@
 	sa.un.sun_family = AF_UNIX;
 	if (i_strocpy(sa.un.sun_path, path, sizeof(sa.un.sun_path)) < 0) {
 		/* too long path */
-		errno = EINVAL;
+		errno = EOVERFLOW;
 		return -1;
 	}