diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-01-16 13:59:09 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-01-16 13:59:09 +0000 |
commit | e6567554edba88735a97a846d1edb89025fa9863 (patch) | |
tree | dc7392f996ed5601e7c5dd4a658164d153da57a6 | |
parent | a12e57ce84b3066deeb430d47e568b076330dda9 (diff) | |
download | mailfromd-gmach-before-rename.tar.gz mailfromd-gmach-before-rename.tar.bz2 |
Ported r1571 from branches/gmach:gmach-before-rename
* src/engine.c: (milter_conn_accept): Take a third argument,
specifying the actual length of the sa structure.
Return 0 if mailfromd_acl is not given.
* gacopyz/gacopyz.h, gacopyz/gacopyz.c: xxfi_accept takes third
argument, specifying the actual length of the sa structure.
git-svn-id: file:///svnroot/mailfromd/branches/gmach-before-rename@1574 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | gacopyz/gacopyz.c | 2 | ||||
-rw-r--r-- | gacopyz/gacopyz.h | 3 | ||||
-rw-r--r-- | src/engine.c | 15 |
4 files changed, 18 insertions, 12 deletions
@@ -1 +1,11 @@ +2008-01-16 Sergey Poznyakoff <gray@gnu.org.ua> + + Ported r1571 from branches/gmach: + + * src/engine.c: (milter_conn_accept): Take a third argument, + specifying the actual length of the sa structure. + Return 0 if mailfromd_acl is not given. + * gacopyz/gacopyz.h, gacopyz/gacopyz.c: xxfi_accept takes third + argument, specifying the actual lengthof the sa structure. + 2008-01-14 Sergey Poznyakoff <gray@gnu.org.ua> diff --git a/gacopyz/gacopyz.c b/gacopyz/gacopyz.c index 98926384..c4d7292e 100644 --- a/gacopyz/gacopyz.c +++ b/gacopyz/gacopyz.c @@ -1463,3 +1463,3 @@ gacopyz_handle_connection(gacopyz_conn_t conn) if (conn->desc.xxfi_accept - && conn->desc.xxfi_accept(conn, fd, &addr)) { + && conn->desc.xxfi_accept(conn, fd, &addr, addrlen)) { if (GACOPYZ_CONN_LOG_MATCH(conn, SMI_LOG_DEBUG)) diff --git a/gacopyz/gacopyz.h b/gacopyz/gacopyz.h index 180b5097..2798914a 100644 --- a/gacopyz/gacopyz.h +++ b/gacopyz/gacopyz.h @@ -207,3 +207,4 @@ struct gacopyz_milter_descr int (*xxfi_idle) (gacopyz_conn_t); /* Idle handler */ - int (*xxfi_accept) (gacopyz_conn_t, int, const milter_sockaddr_t *); + int (*xxfi_accept) (gacopyz_conn_t, int, const milter_sockaddr_t *, + int salen); diff --git a/src/engine.c b/src/engine.c index d125f982..b18de94e 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1196,5 +1196,5 @@ child_start() static int -milter_conn_accept (gacopyz_conn_t conn, int fd, const milter_sockaddr_t *msa) +milter_conn_accept (gacopyz_conn_t conn, int fd, const milter_sockaddr_t *msa, + int len) { - int len; mu_acl_result_t res; @@ -1202,10 +1202,5 @@ milter_conn_accept (gacopyz_conn_t conn, int fd, const milter_sockaddr_t *msa) char *p; - - switch (msa->sa.sa_family) { - case AF_UNIX: - len = sizeof(struct sockaddr_un); - break; - case AF_INET: - len = sizeof(struct sockaddr_in); - } + + if (!mailfromd_acl) + return 0; |