Date: Mon, 21 Apr 2008 04:13:17 +0400 From: Solar Designer <solar@...nwall.com> To: popa3d-users@...ts.openwall.com Subject: Re: patch: discarding domain if no virtual domains On Thu, Apr 10, 2008 at 05:34:47PM +0300, Lena@...a.kiev.ua wrote: > ... I want users to be able > to continie to use full email addresses as POP3 logins, > popa3d to just ignore domains in logins and to use localpart as the username. > I wrote and tested a patch http://lena.kiev.ua/popa3d-1.0.2-nonvirtual.diff > It seems to work OK. I also include the same patch below. Thank you for contributing the patch. I've placed it in here (with a link to this message added as a comment before the actual patch): ftp://ftp.openwall.com/pub/projects/popa3d/contrib/patches/ I think that this is a bit too much of a special case to link to the patch from the popa3d homepage, and the patch is trivial. > + strncpy(pop_user, user, at_offset); This is fine, but I'd use memcpy() here. strncpy() is almost never the right choice because of its weird semantics - NUL padding (which is slow), but no guaranteed NUL termination. Most of the time, when I write portable code, I use strncat() instead (not forgetting to set the first character of the target buffer to NUL and to subtract 1 from the buffer size). Thanks again, Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.