changeset 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 d064c57a601d
children 4ce8f47d20af
files src/lib/net.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;
 	}