diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2013-02-05 11:45:19 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2013-02-05 11:45:19 +0000 |
commit | a22b20a625872fe007578606468f19db80bf4e46 (patch) | |
tree | d187d315377cda3a38eacb26c6fb3ed65e94c047 /usr.sbin/smtpd/lka_session.c | |
parent | 7cd8ab6cfacbee8d6601302f1bda468a6acd83f0 (diff) |
- handle getaddrinfo() error as LKA_TEMPFAIL
- handle getsockname() error in smtp_connected()
- accept '/' as part of user-part, expand to ':' as done by qmail
- fix wrong check in mda leading to bogus Return-Path header
- fix aliases parsing when there's a white space between key and separator
- some cosmethic cleanup
Diffstat (limited to 'usr.sbin/smtpd/lka_session.c')
-rw-r--r-- | usr.sbin/smtpd/lka_session.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c index 5a71fd494bf..bc9238ee0d8 100644 --- a/usr.sbin/smtpd/lka_session.c +++ b/usr.sbin/smtpd/lka_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_session.c,v 1.53 2013/01/31 18:34:43 eric Exp $ */ +/* $OpenBSD: lka_session.c,v 1.54 2013/02/05 11:45:18 gilles Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@poolp.org> @@ -584,9 +584,14 @@ lka_expand_token(char *dest, size_t len, const char *token, if ((size_t)i + 1 >= len) return 0; - memcpy(dest, string + begoff, i); + string += begoff; + for (; i; i--) { + *dest = (*string == '/') ? ':' : *string; + dest++; + string++; + } - return i; + return endoff - begoff; } |