Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 21 Apr 2008 04:13:17 +0400
From: Solar Designer <>
Subject: Re: patch: discarding domain if no virtual domains

On Thu, Apr 10, 2008 at 05:34:47PM +0300, 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
> 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):

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,


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.