diff options
-rw-r--r-- | mail/proxsmtp/Makefile | 6 | ||||
-rw-r--r-- | mail/proxsmtp/distinfo | 13 | ||||
-rw-r--r-- | mail/proxsmtp/patches/patch-aa | 13 | ||||
-rw-r--r-- | mail/proxsmtp/patches/patch-ab | 37 | ||||
-rw-r--r-- | mail/proxsmtp/patches/patch-config.h.in | 19 | ||||
-rw-r--r-- | mail/proxsmtp/patches/patch-configure | 15 |
6 files changed, 75 insertions, 28 deletions
diff --git a/mail/proxsmtp/Makefile b/mail/proxsmtp/Makefile index f70eb0189b2..0f593ce9539 100644 --- a/mail/proxsmtp/Makefile +++ b/mail/proxsmtp/Makefile @@ -1,13 +1,13 @@ -# $NetBSD: Makefile,v 1.9 2010/11/13 21:08:59 shattered Exp $ +# $NetBSD: Makefile,v 1.10 2011/09/12 16:30:30 taca Exp $ -DISTNAME= proxsmtp-1.0 -PKGREVISION= 1 +DISTNAME= proxsmtp-1.9 CATEGORIES= mail MASTER_SITES= http://memberwebs.com/stef/software/proxsmtp/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://memberwebs.com/stef/software/proxsmtp/ COMMENT= SMTP proxy content filter +LICENSE= modified-bsd PKG_DESTDIR_SUPPORT= user-destdir diff --git a/mail/proxsmtp/distinfo b/mail/proxsmtp/distinfo index 244219f50e6..67be643399e 100644 --- a/mail/proxsmtp/distinfo +++ b/mail/proxsmtp/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.3 2005/02/24 09:59:28 agc Exp $ +$NetBSD: distinfo,v 1.4 2011/09/12 16:30:30 taca Exp $ -SHA1 (proxsmtp-1.0.tar.gz) = eb733956612c1655cfd2f0ac985c0a896e73e505 -RMD160 (proxsmtp-1.0.tar.gz) = 8cb6988c8a2cd54447b53e23ca113750423c925d -Size (proxsmtp-1.0.tar.gz) = 154743 bytes -SHA1 (patch-aa) = 09bba87bf89e0f3a54b68fc77922052f88563579 -SHA1 (patch-ab) = c7d79e8491d9c7571a18da8a7bcdb3a9b7a93f11 +SHA1 (proxsmtp-1.9.tar.gz) = 948d3035e7331d9e5f93ec7c2e8f0e7cb3024bb1 +RMD160 (proxsmtp-1.9.tar.gz) = 6d471c524c78b54cf96e81fc8bcd75ca7dc95a6e +Size (proxsmtp-1.9.tar.gz) = 182800 bytes +SHA1 (patch-ab) = dd480c9d8fbe3af2f5afac3afc5dbc9f52d0332c +SHA1 (patch-config.h.in) = 8871254abc27527bb6de5c3349db5963ffb81f3f +SHA1 (patch-configure) = 4b86247cf8b0b81dbf0fcad1b14aaa1705e76661 diff --git a/mail/proxsmtp/patches/patch-aa b/mail/proxsmtp/patches/patch-aa deleted file mode 100644 index 59a3381defa..00000000000 --- a/mail/proxsmtp/patches/patch-aa +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-aa,v 1.1.1.1 2004/12/02 04:08:18 jlam Exp $ - ---- common/sock_any.h.orig 2004-09-03 20:34:42.000000000 -0400 -+++ common/sock_any.h -@@ -57,7 +57,7 @@ struct sockaddr_any - struct sockaddr_in6 in6; - #endif - } s; -- size_t namelen; -+ socklen_t namelen; - }; - - #define SANY_ADDR(any) ((any).s.a) diff --git a/mail/proxsmtp/patches/patch-ab b/mail/proxsmtp/patches/patch-ab index 58d01f60afb..f8add7060f2 100644 --- a/mail/proxsmtp/patches/patch-ab +++ b/mail/proxsmtp/patches/patch-ab @@ -1,13 +1,38 @@ -$NetBSD: patch-ab,v 1.2 2004/12/04 20:37:47 jlam Exp $ +$NetBSD: patch-ab,v 1.3 2011/09/12 16:30:30 taca Exp $ ---- common/smtppass.c.orig 2004-12-01 14:09:52.000000000 -0500 +* Take care of none existence case of setresgid(2) or setresuid(2). + + +--- common/smtppass.c.orig 2011-01-23 22:07:08.000000000 +0000 +++ common/smtppass.c -@@ -591,7 +591,7 @@ static spctx_t* init_thread(int fd) +@@ -447,10 +447,21 @@ static void drop_privileges() + if(pw == NULL) + errx(1, "couldn't look up user: %s", g_state.user); + ++#if defined(HAVE_SETRESGID) && defined(HAVE_SETRESUID) + if(setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1 || + setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) == -1) + err(1, "unable to switch to user: %s (uid %d, gid %d)", + g_state.user, pw->pw_uid, pw->pw_gid); ++#else ++ if(setgid(pw->pw_gid) == -1 || ++ setuid(pw->pw_uid) == -1) ++ err(1, "unable to switch to user: %s (uid %d, gid %d)", g_state.user, pw->pw_uid, pw->pw_gid); ++ ++ /* A paranoia check */ ++ if(setreuid(-1, 0) == 0) ++ err(1, "unable to completely drop privileges"); ++ ++#endif + + #ifdef HAVE_LIBCAP + /* +@@ -669,7 +680,7 @@ static spctx_t* init_thread(int fd) g_unique_id++; - sp_unlock(); - + sp_unlock(); + - sp_messagex(ctx, LOG_DEBUG, "processing %d on thread %x", fd, (int)pthread_self()); + sp_messagex(ctx, LOG_DEBUG, "processing %d on thread %p", fd, pthread_self()); - + /* Connect to the outgoing server ... */ if(make_connections(ctx, fd) == -1) diff --git a/mail/proxsmtp/patches/patch-config.h.in b/mail/proxsmtp/patches/patch-config.h.in new file mode 100644 index 00000000000..e1f09d4f115 --- /dev/null +++ b/mail/proxsmtp/patches/patch-config.h.in @@ -0,0 +1,19 @@ +$NetBSD: patch-config.h.in,v 1.1 2011/09/12 16:30:30 taca Exp $ + +* Existence of setresgid(2) and setresuid(2). + +--- config.h.in.orig 2011-01-23 22:25:58.000000000 +0000 ++++ config.h.in +@@ -81,6 +81,12 @@ + /* Define to 1 if you have the `setenv' function. */ + #undef HAVE_SETENV + ++/* Define to 1 if you have the `setresgid' function. */ ++#undef HAVE_SETRESGID ++ ++/* Define to 1 if you have the `setresuid' function. */ ++#undef HAVE_SETRESUID ++ + /* Define to 1 if you have the <stdarg.h> header file. */ + #undef HAVE_STDARG_H + diff --git a/mail/proxsmtp/patches/patch-configure b/mail/proxsmtp/patches/patch-configure new file mode 100644 index 00000000000..5839f2ff92e --- /dev/null +++ b/mail/proxsmtp/patches/patch-configure @@ -0,0 +1,15 @@ +$NetBSD: patch-configure,v 1.1 2011/09/12 16:30:30 taca Exp $ + +* Check existence of setresgid(2) and setresuid(2). + +--- configure.orig 2011-01-23 22:25:53.000000000 +0000 ++++ configure +@@ -5060,7 +5060,7 @@ _ACEOF + fi + done + +-for ac_func in getline getdelim ++for ac_func in getline getdelim setresgid setresuid + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |