[Dovecot] Apple patches 1-5

Timo Sirainen tss at iki.fi
Tue Dec 16 05:01:45 EET 2008


On Mon, 2008-12-15 at 11:39 -0600, Mike Abbott wrote:
> Here are the first few simple patches from Apple, based on  
> dovecot-1.1.7.  The comments with "APPLE" in them helped us merge in  
> your new releases; feel free to remove them.  Please let me know if  
> you want subsequent patches in a different format, or if you have any  
> questions.
> 
> Patch #1.  Some versions of Mac OS X have buggy CMSG_* macros.

Is the nopen() check really necessary? I'd like to know at least what
kind of a bug it works around for before applying it. The fstat()+inode
comparing doesn't catch it?

> Patch #2.  Don't set "<username>=1" in the environment.

I put the fix to auth-client.c:
http://hg.dovecot.org/dovecot-1.1/rev/3145be9f66ae

> Patch #3.  Some versions of Mac OS X return near-duplicate kevents.

This probably won't affect other BSDs, so I think the duplicate removal
should be around #ifdef __APPLE__?

> Patch #4.  Null renames are actually pretty slow on HFS (Apple's file  
> system), so avoid them.

I've thought about adding a similar check before, but it removes an
intentional side effect: It makes sure that the file exists. If it
doesn't exist (flags had changed), its new name is looked up and the
rename is tried again. Would it be faster to instead stat() to see if
the file exists?

v1.2 suppresses unnecessary flag changes, so these dummy renames (or
stat()s) should happen less often.

> Patch #5.  Required by Apple's lawyers.

That's fine by me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20081216/6f44ff22/attachment.bin 


More information about the dovecot mailing list