[Dovecot] imap: Error: net_connect_unix(/.../auth-master) failed: Invalid argument
Hi,
I'm unable to get past the subject error trying to setup dovecot 2.1.10 on FreeBSD 6.4: right after login the server closes the connection (testing with telnet)
I've tried manualy chown()ing auth-master to 666, so permission issues should be ruled out.
I'm attaching logs, config and excerpt of ktrace -id. I've built a version with debug symbols, but I don't seem to hit a breakpoint in net_connect_unix on lib/network.c
What can I look at?
tks
pica
On Sat, 2013-01-05 at 21:51 +0100, Joan Picanyol i Puig wrote:
I'm unable to get past the subject error trying to setup dovecot 2.1.10 on FreeBSD 6.4: right after login the server closes the connection (testing with telnet)
I think this is the reason:
if (i_strocpy(sa.un.sun_path, path, sizeof(sa.un.sun_path)) < 0) {
/* too long path */
errno = EINVAL;
Your path is longer than possible. This patch should make it clearer in future: http://hg.dovecot.org/dovecot-2.1/rev/e4cc3f2b66e3
- Timo Sirainen tss@iki.fi [20130108 02:17]:
On Sat, 2013-01-05 at 21:51 +0100, Joan Picanyol i Puig wrote:
I'm unable to get past the subject error trying to setup dovecot 2.1.10 on FreeBSD 6.4: right after login the server closes the connection (testing with telnet)
I think this is the reason:
if (i_strocpy(sa.un.sun_path, path, sizeof(sa.un.sun_path)) < 0) { /* too long path */ errno = EINVAL;
Your path is longer than possible. This patch should make it clearer in future: http://hg.dovecot.org/dovecot-2.1/rev/e4cc3f2b66e3
Thanks, changing base_dir did the trick. I wonder why though, since both PATH_MAX and FILENAME_MAX are defined as 1024 on my system...
tks
pica
On 8.1.2013, at 11.15, Joan Picanyol i Puig lists-dovecot@biaix.org wrote:
if (i_strocpy(sa.un.sun_path, path, sizeof(sa.un.sun_path)) < 0) { /* too long path */ errno = EINVAL;
Your path is longer than possible. This patch should make it clearer in future: http://hg.dovecot.org/dovecot-2.1/rev/e4cc3f2b66e3
Thanks, changing base_dir did the trick. I wonder why though, since both PATH_MAX and FILENAME_MAX are defined as 1024 on my system…
UNIX socket paths seem to have a rather small limit in all operating systems. Linux and Solaris has 108 bytes, OSX has 104 bytes. Probably increasing it would break some programs.
Although I wonder if it would be possible to simply allocate more memory than the struct contains and just write the string there. OSX also has some length parameter:
unsigned char sun_len; /* sockaddr len including null */
Anyway, probably not worth the trouble.
participants (2)
-
Joan Picanyol i Puig
-
Timo Sirainen