rpms/milter-greylist/devel README.fedora, NONE, 1.1 overflow.patch, NONE, 1.1 size_t.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 lastver, 1.3, 1.4 milter-greylist.spec, 1.24, 1.25 sources, 1.12, 1.13

Enrico Scholz ensc at fedoraproject.org
Sat Feb 14 10:56:59 UTC 2009


Author: ensc

Update of /cvs/extras/rpms/milter-greylist/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5147

Modified Files:
	.cvsignore lastver milter-greylist.spec sources 
Added Files:
	README.fedora overflow.patch size_t.patch 
Log Message:
updated


--- NEW FILE README.fedora ---
Upstream compatibility
======================

The fedora package uses a FHS compliant directory layout and does NOT
place files below /var/milter-greylist.  Instead of:

* the database is located at /var/lib/milter-greylist/db
* the sendmail socket is located at /var/run/milter-greylist/milter-greylist.sock
* the pidfile is located at /var/run/milter-greylist.pid

This might be incompatible with online documentation which refers to
the original paths.  Hence, please use the documentation provided by
this package where you should find actual paths.


Postfix compatibility
=====================

You might need to give 0666 permissions to the socket file:

| socket "/var/run/milter-greylist/milter-greylist.sock" 0666

Alternatively, use a TCP socket and setup iptables rules to allow only
connections from the postfix user.

overflow.patch:

--- NEW FILE overflow.patch ---
The myhostname buffer was declared with

|        char myhostname[ADDRLEN + 1];

and

./spamd.c:#define SPAMD_BUFLEN 1024
./dump.h:#define ADDRLEN        324


Hence, using SPAMD_BUFLEN as size of myhostname can cause overflows.
Explicit terminating is required because it is undefined whether hostname
will be null-terminated when it was truncated.


Index: milter-greylist-4.2b1/spamd.c
===================================================================
--- milter-greylist-4.2b1.orig/spamd.c
+++ milter-greylist-4.2b1/spamd.c
@@ -286,10 +286,11 @@ spamd_rcvhdr(priv, str, len)
 		   priv->priv_addrlen, 
 		   ipstr, sizeof(ipstr));
 
-	if (gethostname(myhostname, SPAMD_BUFLEN)) {
+	if (gethostname(myhostname, sizeof(myhostname))) {
 		mg_log(LOG_WARNING, "spamd gethostname failed");
 		strcpy(myhostname, "unknown");
 	}
+	myhostname[sizeof(myhostname)-1] = '\0';
 
 	/* strftime format specifier for timezone offset %z is not 
 	 * generally available (GNU only). For portability we force timezone

size_t.patch:

--- NEW FILE size_t.patch ---
A '%zd' is the correct printf format-string for size_t types.

Index: milter-greylist-4.2b1/spamd.c
===================================================================
--- milter-greylist-4.2b1.orig/spamd.c
+++ milter-greylist-4.2b1/spamd.c
@@ -168,7 +168,7 @@ spamd_check(ad, stage, ap, priv)
 	spamd_rcvhdr(priv, rcvhdr, SPAMD_BUFLEN);
 
 	snprintf(buffer, SPAMD_BUFLEN,
-	  "CHECK SPAMC/1.2\r\nContent-length: %d\r\n\r\n",
+	  "CHECK SPAMC/1.2\r\nContent-length: %zd\r\n\r\n",
 	  priv->priv_msgcount + strlen(rcvhdr));
 
 	if ((sock = spamd_socket(conf.c_spamdsocktype, 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/milter-greylist/devel/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore	21 Jun 2008 19:04:19 -0000	1.4
+++ .cvsignore	14 Feb 2009 10:56:28 -0000	1.5
@@ -1 +1 @@
-milter-greylist-4.1.1.tgz
+milter-greylist-4.2b1.tgz


Index: lastver
===================================================================
RCS file: /cvs/extras/rpms/milter-greylist/devel/lastver,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- lastver	21 Jun 2008 19:04:19 -0000	1.3
+++ lastver	14 Feb 2009 10:56:29 -0000	1.4
@@ -1 +1 @@
-4.1.1
+4.1.12


Index: milter-greylist.spec
===================================================================
RCS file: /cvs/extras/rpms/milter-greylist/devel/milter-greylist.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- milter-greylist.spec	8 Aug 2008 17:48:03 -0000	1.24
+++ milter-greylist.spec	14 Feb 2009 10:56:29 -0000	1.25
@@ -6,6 +6,8 @@
 %bcond_with			spf
 ##
 
+%global beta		b1
+
 %global username	grmilter
 %global vardir		%_var/lib/%name
 %global dbdir		%vardir/db
@@ -16,13 +18,16 @@
 
 Summary:	Milter for greylisting, the next step in the spam control war
 Name:		milter-greylist
-Version:	4.1.1
-Release:	%release_func 2
+Version:	4.2
+Release:	%release_func 0.0.%{?beta}
 License:	BSD with advertising
 Group:		System Environment/Daemons
 URL:		http://hcpnet.free.fr/milter-greylist/
 Source0:	ftp://ftp.espci.fr/pub/milter-greylist/%name-%version%{?beta}.tgz
+Source1:	README.fedora
 Patch0:		milter-greylist-2.0.2-sysv.patch
+Patch1:		overflow.patch
+Patch2:		size_t.patch
 BuildRoot:	%_tmppath/%name-%version-%release-root
 Requires:		init(%name)
 Provides:		user(%username)  = 7
@@ -69,11 +74,17 @@
 %prep
 %setup -q %{?beta:-n %name-%version%beta}
 %patch0 -p1 -b .sysv
+%patch1 -p1
+%patch2 -p1
+
+install -p -m0644 %SOURCE1 .
 
 sed -i -e 's!/usr/lib/libresolv.a!/no-such-lib.a!g' configure
 sed -i -e 's!^\#\?user .*!user "%username"!;
            s!^\#socket !socket !;
-	   s!^pidfile .*!\#\0!;' greylist.conf
+	   s!^pidfile .*!\#\0!;
+	   /^dumpfile/a\' \
+	-e 'geoipdb "%_datadir/GeoIP/GeoIP.dat"' greylist.conf
 
 for i in `find -type f`; do
     sed -e 's!/var/milter-greylist/milter-greylist.sock!%rundir/milter-greylist.sock!g;
@@ -87,12 +98,14 @@
 
 %define makeflags	TEST=false BINDIR=%_sbindir
 %build
-export CPPFLAGS="-DUSE_CURL -DUSE_GEOIP -D_REENTRANT $(pkg-config --cflags-only-I libcurl libbind)"
+export CPPFLAGS="-DUSE_CURL -DUSE_GEOIP -D_GNU_SOURCE -D_REENTRANT $(pkg-config --cflags-only-I libcurl libbind)"
 export LDFLAGS="-Wl,--as-needed -lbind -lcurl -lGeoIP"
 %configure \
 	--disable-rpath				\
 	--with-user=%username			\
 	--enable-dnsrbl				\
+	--enable-spamassassin			\
+	--enable-p0f				\
 	--disable-drac				\
 	--with-drac-db=%vardir/drac/drac.db	\
 	%{?with_spf:--with-libspf=/usr}
@@ -144,12 +157,12 @@
 
 %files
 %defattr(-,root,root,-)
-%doc ChangeLog README
+%doc ChangeLog README README.fedora
 %_mandir/man*/*
 %attr(0640,root,%username) %verify(not mtime) %config(noreplace) %_sysconfdir/mail/greylist.conf
 %dir %attr(0751,%username,%username) %vardir
 %dir %attr(0770,root,%username) %dbdir
-%dir %attr(0700,%username,root) %rundir
+%dir %attr(0710,%username,mail) %rundir
 %_sbindir/*
 
 %ghost %rundir/milter-greylist.sock
@@ -162,6 +175,15 @@
 %endif
 
 %changelog
+* Sat Feb 14 2009 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 4.2-0.0.b1
+- updated to 4.2b1
+- enabled spamassassin + p0f support
+- set path to GeoIP database in sample configuration (#439087)
+- changed /var/run/milter-greylist to be owned by the mail group and
+  made it group-accessibly; this should allow usage with postfix when
+  setting a 0666 socket mode (#210765)
+- added README.fedora
+
 * Fri Aug  8 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 4.1.1-2
 - fix license tag
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/milter-greylist/devel/sources,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- sources	21 Jun 2008 19:04:19 -0000	1.12
+++ sources	14 Feb 2009 10:56:29 -0000	1.13
@@ -1 +1 @@
-525f60bd74c8269f658b99dc5405d5c1  milter-greylist-4.1.1.tgz
+2e76e2643469ec393a15dfce9f8ff695  milter-greylist-4.2b1.tgz




More information about the fedora-extras-commits mailing list