Mercurial > dovecot > core-2.2
changeset 15601:e4cc3f2b66e3
net_connect_unix(): If path is too long, return ENAMETOOLONG if it's available.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 08 Jan 2013 03:19:14 +0200 |
parents | 36eb80cd02ea |
children | 3e3e0b482a36 |
files | src/lib/network.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/network.c Mon Jan 07 10:55:27 2013 +0200 +++ b/src/lib/network.c Tue Jan 08 03:19:14 2013 +0200 @@ -278,7 +278,11 @@ sa.un.sun_family = AF_UNIX; if (i_strocpy(sa.un.sun_path, path, sizeof(sa.un.sun_path)) < 0) { /* too long path */ +#ifdef ENAMETOOLONG + errno = ENAMETOOLONG; +#else errno = EINVAL; +#endif return -1; }