On Sun, Dec 09, 2007 at 08:29:49PM +0200, Timo Sirainen wrote: > http://dovecot.org/releases/1.1/beta/dovecot-1.1.beta11.tar.gz > http://dovecot.org/releases/1.1/beta/dovecot-1.1.beta11.tar.gz.sig > > This one should be the last beta release before the first v1.1 release > candidate.
Looks like the fix to Solaris dirent handling didn't make it into beta11. Here is a recap of the problem: This affects anyone under Solaris 8, and probably all other versions of Solaris as well and breaks many mailbox LIST commands. In src/lib-storage/list/mailbox-list-fs-iter.c, in the function fs_list_dir_next(), the following code near the end of the function is the culprit: if (i_strocpy(dir->dirent.d_name, fname, sizeof(dir->dirent.d_name)) < 0) { /* name too large.. shouldn't happen. */ continue; } To fix it, I changed it to: if (i_strocpy(dir->dirent.d_name, fname, MAXNAMLEN) < 0) { /* name too large.. shouldn't happen. */ continue; } It appears that sizeof(dir->dirent.d_name) always returns "1" under Solaris. This is a common dirent portability issue that affects a few operating systems, including Solaris. I googled around and found other authors who have done crazy stuff like this: #ifdef BROKEN_ONE_BYTE_DIRENT_D_NAME strcpy(dirent->d_name, filename, MAXPATHLEN); #else strcpy(dirent->d_name, filename, sizeof(dirent->d_name)); #endif There is probably a cleaner way to deal with this though. From what I can tell, this is the only place in Dovecot where a sizeof() is done on d_name. Unfortunately, Dovecot beta11 is not usable in a production environment under Solaris until this issue is resolved. -- Dean Brooks [EMAIL PROTECTED]