diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2013-05-27 01:02:32 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-05-27 01:02:32 +0000 |
commit | 2451dc9dc301815d05be9c318ee802833db3b990 (patch) | |
tree | 78a5de95982862ad3e25c40417f8f6f29466fe55 /mail-mta | |
parent | Bug #437386: FreeBSD netqmail support. FreeBSD does not have a "root" group, ... (diff) | |
download | gentoo-2-2451dc9dc301815d05be9c318ee802833db3b990.tar.gz gentoo-2-2451dc9dc301815d05be9c318ee802833db3b990.tar.bz2 gentoo-2-2451dc9dc301815d05be9c318ee802833db3b990.zip |
Bug #437386: FreeBSD netqmail support.
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'mail-mta')
-rw-r--r-- | mail-mta/netqmail/ChangeLog | 6 | ||||
-rw-r--r-- | mail-mta/netqmail/files/1.06-fbsd-utmpx.patch | 64 | ||||
-rw-r--r-- | mail-mta/netqmail/netqmail-1.06-r2.ebuild | 3 |
3 files changed, 71 insertions, 2 deletions
diff --git a/mail-mta/netqmail/ChangeLog b/mail-mta/netqmail/ChangeLog index 40c1f8925eec..da846a486c89 100644 --- a/mail-mta/netqmail/ChangeLog +++ b/mail-mta/netqmail/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for mail-mta/netqmail # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/ChangeLog,v 1.63 2013/05/27 00:45:52 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/ChangeLog,v 1.64 2013/05/27 01:02:32 robbat2 Exp $ + + 27 May 2013; Robin H. Johnson <robbat2@gentoo.org> + +files/1.06-fbsd-utmpx.patch, netqmail-1.06-r2.ebuild: + Bug #437386: FreeBSD netqmail support. *netqmail-1.06-r2 (27 May 2013) diff --git a/mail-mta/netqmail/files/1.06-fbsd-utmpx.patch b/mail-mta/netqmail/files/1.06-fbsd-utmpx.patch new file mode 100644 index 000000000000..8500eb53e3ee --- /dev/null +++ b/mail-mta/netqmail/files/1.06-fbsd-utmpx.patch @@ -0,0 +1,64 @@ +--- qbiff.c.orig 2010-04-06 08:43:28.000000000 -0300 ++++ qbiff.c 2010-04-06 08:44:35.000000000 -0300 +@@ -1,13 +1,6 @@ + #include <sys/types.h> + #include <sys/stat.h> +-#include <utmp.h> +-#ifndef UTMP_FILE +-#ifdef _PATH_UTMP +-#define UTMP_FILE _PATH_UTMP +-#else +-#define UTMP_FILE "/etc/utmp" +-#endif +-#endif ++#include <utmpx.h> + #include "readwrite.h" + #include "stralloc.h" + #include "substdio.h" +@@ -21,15 +14,12 @@ + #include "env.h" + #include "exit.h" + +-substdio ssutmp; +-char bufutmp[sizeof(struct utmp) * 16]; +-int fdutmp; + substdio sstty; + char buftty[1024]; + int fdtty; + +-struct utmp ut; +-char line[sizeof(ut.ut_line) + 1]; ++struct utmpx *ut; ++char line[sizeof(ut->ut_line) + 1]; + stralloc woof = {0}; + stralloc tofrom = {0}; + stralloc text = {0}; +@@ -64,7 +54,7 @@ + if (!(user = env_get("USER"))) _exit(0); + if (!(sender = env_get("SENDER"))) _exit(0); + if (!(userext = env_get("LOCAL"))) _exit(0); +- if (str_len(user) > sizeof(ut.ut_name)) _exit(0); ++ if (str_len(user) > sizeof(ut->ut_user)) _exit(0); + + if (!stralloc_copys(&tofrom,"*** TO <")) _exit(0); + if (!stralloc_cats(&tofrom,userext)) _exit(0); +@@ -89,15 +79,11 @@ + if (!stralloc_cat(&woof,&text)) _exit(0); + if (!stralloc_cats(&woof,"\015\n")) _exit(0); + +- fdutmp = open_read(UTMP_FILE); +- if (fdutmp == -1) _exit(0); +- substdio_fdbuf(&ssutmp,read,fdutmp,bufutmp,sizeof(bufutmp)); +- +- while (substdio_get(&ssutmp,&ut,sizeof(ut)) == sizeof(ut)) +- if (!str_diffn(ut.ut_name,user,sizeof(ut.ut_name))) ++ while ((ut = getutxent()) != NULL) ++ if (ut->ut_type == USER_PROCESS && !str_diffn(ut->ut_user,user,sizeof(ut->ut_user))) + { +- byte_copy(line,sizeof(ut.ut_line),ut.ut_line); +- line[sizeof(ut.ut_line)] = 0; ++ byte_copy(line,sizeof(ut->ut_line),ut->ut_line); ++ line[sizeof(ut->ut_line)] = 0; + if (line[0] == '/') continue; + if (!line[0]) continue; + if (line[str_chr(line,'.')]) continue; diff --git a/mail-mta/netqmail/netqmail-1.06-r2.ebuild b/mail-mta/netqmail/netqmail-1.06-r2.ebuild index 1ea9b1749d5d..991f1023c083 100644 --- a/mail-mta/netqmail/netqmail-1.06-r2.ebuild +++ b/mail-mta/netqmail/netqmail-1.06-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/netqmail-1.06-r2.ebuild,v 1.1 2013/05/27 00:45:52 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/netqmail/netqmail-1.06-r2.ebuild,v 1.2 2013/05/27 01:02:32 robbat2 Exp $ EAPI=5 @@ -93,6 +93,7 @@ src_prepare() { epatch "${FILESDIR}"/${PV}-exit.patch epatch "${FILESDIR}"/${PV}-readwrite.patch epatch "${DISTDIR}"/${QMAIL_LARGE_DNS} + epatch "${FILESDIR}"/${PV}-fbsd-utmpx.patch ht_fix_file Makefile* |