View | Details | Raw Unified | Return to bug 115957 | Differences between
and this patch

Collapse All | Expand All

(-)b/mail/dspam/Makefile (-4 / +13 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	dspam
8
PORTNAME=	dspam
9
PORTVERSION=	3.10.2
9
PORTVERSION=	3.10.2
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	mail
11
CATEGORIES=	mail
12
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
12
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
13
13
Lines 16-21 COMMENT= Bayesian spam filter Link Here
16
16
17
LICENSE=	AGPLv3
17
LICENSE=	AGPLv3
18
18
19
USERS=		dspam
20
GROUPS=		dspam
21
19
OPTIONS_SUB=	yes
22
OPTIONS_SUB=	yes
20
23
21
OPTIONS_DEFINE=	SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \
24
OPTIONS_DEFINE=	SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \
Lines 98-109 CONFLICTS= dspam-devel-[0-9]* Link Here
98
SIGNATURE_LIFE?=	15
101
SIGNATURE_LIFE?=	15
99
102
100
_VAR_DIR=	/var
103
_VAR_DIR=	/var
104
105
RUN_DIR?=	${_VAR_DIR}/run/dspam
106
101
LOG_DIR?=	${_VAR_DIR}/log/dspam
107
LOG_DIR?=	${_VAR_DIR}/log/dspam
102
LOGFILE?=	${LOG_DIR}/dspam.log
108
LOGFILE?=	${LOG_DIR}/dspam.log
103
109
104
DSPAM_MODE?=	4510
110
DSPAM_MODE?=	4510
105
DSPAM_OWNER?=	root
111
DSPAM_OWNER?=	${USERS}
106
DSPAM_GROUP?=	mail
112
DSPAM_GROUP?=	${GROUPS}
107
113
108
DSPAM_ETC?=	${LOCALBASE}/etc
114
DSPAM_ETC?=	${LOCALBASE}/etc
109
DSPAM_HOME?=	${_VAR_DIR}/db/dspam
115
DSPAM_HOME?=	${_VAR_DIR}/db/dspam
Lines 124-129 PLIST_SUB+= DSPAM_HOME=${DSPAM_HOME} \ Link Here
124
CONFIGURE_ARGS+=	--sysconfdir=${DSPAM_ETC}
130
CONFIGURE_ARGS+=	--sysconfdir=${DSPAM_ETC}
125
CONFIGURE_ARGS+=	--with-logdir=${LOG_DIR}
131
CONFIGURE_ARGS+=	--with-logdir=${LOG_DIR}
126
PLIST_SUB+=	LOG_DIR=${LOG_DIR}
132
PLIST_SUB+=	LOG_DIR=${LOG_DIR}
133
PLIST_SUB+=	RUN_DIR=${RUN_DIR}
127
134
128
CONFIGURE_ARGS+=	--with-dspam-home=${DSPAM_HOME}
135
CONFIGURE_ARGS+=	--with-dspam-home=${DSPAM_HOME}
129
CONFIGURE_ARGS+=	--with-dspam-home-owner=${DSPAM_HOME_OWNER}
136
CONFIGURE_ARGS+=	--with-dspam-home-owner=${DSPAM_HOME_OWNER}
Lines 421-426 pre-extract: Link Here
421
	@${ECHO_CMD} "DSPAM_HOME_GROUP=${DSPAM_HOME_GROUP}"
428
	@${ECHO_CMD} "DSPAM_HOME_GROUP=${DSPAM_HOME_GROUP}"
422
	@${ECHO_CMD} "DSPAM_HOME_MODE=${DSPAM_HOME_MODE} (default: 0770)"
429
	@${ECHO_CMD} "DSPAM_HOME_MODE=${DSPAM_HOME_MODE} (default: 0770)"
423
	@${ECHO_CMD} "LOG_DIR=${LOG_DIR} (default: ${_VAR_DIR}/log/dspam)"
430
	@${ECHO_CMD} "LOG_DIR=${LOG_DIR} (default: ${_VAR_DIR}/log/dspam)"
431
	@${ECHO_CMD} "RUN_DIR=${RUN_DIR} (default: ${_VAR_DIR}/run/dspam)"
424
.	ifdef(WITHOUT_SYSLOG)
432
.	ifdef(WITHOUT_SYSLOG)
425
	@${ECHO_CMD} "LOGFILE=${LOGFILE} (default: ${_VAR_DIR}/log/dspam/dspam.log)"
433
	@${ECHO_CMD} "LOGFILE=${LOGFILE} (default: ${_VAR_DIR}/log/dspam/dspam.log)"
426
.	endif
434
.	endif
Lines 558-564 post-install: Link Here
558
		${INSTALL_DATA} ${_file}.sample ${STAGEDIR}${DSPAM_HOME}
566
		${INSTALL_DATA} ${_file}.sample ${STAGEDIR}${DSPAM_HOME}
559
.endfor
567
.endfor
560
568
561
	@${MKDIR} -m ${DSPAM_HOME_MODE} ${STAGEDIR}${LOG_DIR}
569
	@${MKDIR} ${STAGEDIR}${RUN_DIR}
570
	@${MKDIR} ${STAGEDIR}${LOG_DIR}
562
571
563
	@${CAT} ${WRKSRC}/README.FreeBSD
572
	@${CAT} ${WRKSRC}/README.FreeBSD
564
573
(-)b/mail/dspam/files/UPDATING (+12 lines)
Lines 17-22 in the port directory: Link Here
17
make extract;  more `find . -type f -maxdepth 2 -name UPGRADING`
17
make extract;  more `find . -type f -maxdepth 2 -name UPGRADING`
18
18
19
###########################################################################
19
###########################################################################
20
# dspam-3.10.2_2
21
#
22
23
Port Changes:
24
- Runs as dspam:dspam instead of root:mail [1]
25
- Default run directory is now /var/run/dspam [1]
26
- Default daemon/client communication port is now 2424 [1]
27
28
[1] Questionable ownership and security on mail/dspam (PR #115957)
29
30
31
###########################################################################
20
# dspam-3.10.2
32
# dspam-3.10.2
21
#
33
#
22
34
(-)b/mail/dspam/files/dspam.in (-1 / +1 lines)
Lines 25-31 load_rc_config $name Link Here
25
#defaults
25
#defaults
26
: ${dspam_enable="NO"}
26
: ${dspam_enable="NO"}
27
: ${dspam_debug="NO"}
27
: ${dspam_debug="NO"}
28
: ${dspam_pidfile:-/var/run/dspam.pid}
28
: ${dspam_pidfile:-/var/run/dspam/dspam.pid}
29
29
30
command=%%PREFIX%%/bin/${name}
30
command=%%PREFIX%%/bin/${name}
31
31
(-)b/mail/dspam/files/patch-src__client.c (+11 lines)
Added Link Here
1
--- src/client.c.orig	2012-04-11 11:48:33.000000000 -0700
2
+++ src/client.c	2016-04-10 15:57:58.146105267 -0700
3
@@ -304,7 +304,7 @@
4
   struct sockaddr_un saun;
5
   int sockfd;
6
   int yes = 1;
7
-  int port = 24;
8
+  int port = 2424;
9
   int domain = 0;
10
   int addr_len;
11
   char *host;
(-)b/mail/dspam/files/patch-src__daemon.c (+11 lines)
Added Link Here
1
--- src/daemon.c.orig	2012-04-11 11:48:33.000000000 -0700
2
+++ src/daemon.c	2016-04-10 15:57:50.654336293 -0700
3
@@ -97,7 +97,7 @@
4
   int domain = 0;		/* listening on domain socket? */
5
   int listener;			/* listener fd */
6
   int i;
7
-  int port = 24, queue = 32;	/* default port and queue size */
8
+  int port = 2424, queue = 32;	/* default port and queue size */
9
 
10
   signal(SIGPIPE, SIG_IGN);
11
   signal(SIGINT,  process_signal);
(-)a/mail/dspam/files/patch-src__dspam.c (-11 lines)
Removed Link Here
1
--- src/dspam.c.orig	2012-04-11 11:48:33.000000000 -0700
2
+++ src/dspam.c	2014-09-23 19:43:09.688194417 -0700
3
@@ -4194,7 +4194,7 @@
4
 
5
     pidfile = _ds_read_attribute(agent_config, "ServerPID");
6
     if ( pidfile == NULL )
7
-      pidfile = "/var/run/dspam/dspam.pid";
8
+      pidfile = "/var/run/dspam.pid";
9
 
10
     if (pidfile) {
11
       FILE *file;
(-)b/mail/dspam/files/patch-src__dspam.conf.in (-5 / +22 lines)
Lines 1-5 Link Here
1
--- src/dspam.conf.in.orig	2014-09-18 00:33:02.874722063 -0700
1
--- src/dspam.conf.in.orig	2012-04-11 11:48:33.000000000 -0700
2
+++ src/dspam.conf.in	2014-09-18 00:41:49.434685786 -0700
2
+++ src/dspam.conf.in	2016-04-10 16:27:44.179947888 -0700
3
@@ -56,6 +56,7 @@
3
@@ -56,6 +56,7 @@
4
 # necessary if you plan on allowing untrusted processing.
4
 # necessary if you plan on allowing untrusted processing.
5
 #
5
 #
Lines 35-46 Link Here
35
 #PgSQLPort		
35
 #PgSQLPort		
36
 #PgSQLUser		dspam
36
 #PgSQLUser		dspam
37
 #PgSQLPass		changeme
37
 #PgSQLPass		changeme
38
@@ -845,14 +846,14 @@
38
@@ -807,9 +808,9 @@
39
 # interfaces.
40
 #
41
 #ServerHost		127.0.0.1
42
-#ServerPort		24
43
+#ServerPort		2424
44
 #ServerQueueSize	32
45
-#ServerPID		/var/run/dspam.pid
46
+#ServerPID		/var/run/dspam/dspam.pid
47
 
48
 #
49
 # ServerMode specifies the type of LMTP server to start. This can be one of:
50
@@ -845,18 +846,18 @@
39
 # you are running the client and server on the same machine, as it eliminates
51
 # you are running the client and server on the same machine, as it eliminates
40
 # much of the bandwidth overhead.
52
 # much of the bandwidth overhead.
41
 #
53
 #
42
-#ServerDomainSocketPath	"/tmp/dspam.sock"
54
-#ServerDomainSocketPath	"/tmp/dspam.sock"
43
+#ServerDomainSocketPath	"/var/run/dspam.sock"
55
+#ServerDomainSocketPath	"/var/run/dspam/dspam.sock"
44
 
56
 
45
 #
57
 #
46
 # Client Mode: If you are running DSPAM in client/server mode, uncomment and
58
 # Client Mode: If you are running DSPAM in client/server mode, uncomment and
Lines 48-54 Link Here
48
 # a domain socket.
60
 # a domain socket.
49
 #
61
 #
50
-#ClientHost	/tmp/dspam.sock
62
-#ClientHost	/tmp/dspam.sock
51
+#ClientHost	/var/run/dspam.sock
63
+#ClientHost	/var/run/dspam/dspam.sock
52
 #ClientIdent	"secret@Relay1"
64
 #ClientIdent	"secret@Relay1"
53
 #
65
 #
54
 #ClientHost	127.0.0.1
66
 #ClientHost	127.0.0.1
67
-#ClientPort	24
68
+#ClientPort	2424
69
 #ClientIdent	"secret@Relay1"
70
 
71
 # --- RABL ---
(-)b/mail/dspam/pkg-plist (-4 / +5 lines)
Lines 206-213 libdata/pkgconfig/dspam.pc Link Here
206
%%WebUI%%%%WWWDIR%%/templates/ro/nav_preferences.html
206
%%WebUI%%%%WWWDIR%%/templates/ro/nav_preferences.html
207
%%WebUI%%%%WWWDIR%%/templates/ro/nav_quarantine.html
207
%%WebUI%%%%WWWDIR%%/templates/ro/nav_quarantine.html
208
%%WebUI%%%%WWWDIR%%/templates/ro/nav_viewmessage.html
208
%%WebUI%%%%WWWDIR%%/templates/ro/nav_viewmessage.html
209
%%DSPAM_HOME%%/firstrun.txt.sample
209
@(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%) %%DSPAM_HOME%%/firstrun.txt.sample
210
%%DSPAM_HOME%%/firstspam.txt.sample
210
@(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%) %%DSPAM_HOME%%/firstspam.txt.sample
211
%%DSPAM_HOME%%/quarantinefull.txt.sample
211
@(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%) %%DSPAM_HOME%%/quarantinefull.txt.sample
212
@dir(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%,%%DSPAM_HOME_MODE%%) %%DSPAM_HOME%%
212
@dir(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%,%%DSPAM_HOME_MODE%%) %%DSPAM_HOME%%
213
@dir(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%) %%LOG_DIR%%
213
@dir(%%DSPAM_OWNER%%,%%DSPAM_GROUP%%) %%LOG_DIR%%
214
@dir(%%DSPAM_OWNER%%,%%DSPAM_GROUP%%) %%RUN_DIR%%

Return to bug 115957