summaryrefslogtreecommitdiff
path: root/mail/milter-regex/files/patch-milter-regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/milter-regex/files/patch-milter-regex.c')
-rw-r--r--mail/milter-regex/files/patch-milter-regex.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/mail/milter-regex/files/patch-milter-regex.c b/mail/milter-regex/files/patch-milter-regex.c
index 6d3775c69f2e..749178ce15f5 100644
--- a/mail/milter-regex/files/patch-milter-regex.c
+++ b/mail/milter-regex/files/patch-milter-regex.c
@@ -1,6 +1,6 @@
---- milter-regex.c.orig 2013-11-25 09:41:55.000000000 +0100
-+++ milter-regex.c 2013-11-27 05:25:43.000000000 +0100
-@@ -60,6 +60,7 @@
+--- milter-regex.c.orig 2018-09-25 20:31:25 UTC
++++ milter-regex.c
+@@ -61,6 +61,7 @@ extern int parse_ruleset(const char *,
static const char *rule_file_name = "/etc/milter-regex.conf";
static int debug = 0;
@@ -8,7 +8,7 @@
static unsigned maxlines = 0;
static pthread_mutex_t mutex;
-@@ -97,6 +98,7 @@
+@@ -98,6 +99,7 @@ static void msg(int, struct context *,
#define USER "_milter-regex"
#define OCONN "unix:/var/spool/milter-regex/sock"
@@ -16,7 +16,7 @@
#define RCODE_REJECT "554"
#define RCODE_TEMPFAIL "451"
#define XCODE_REJECT "5.7.1"
-@@ -645,6 +647,9 @@
+@@ -646,6 +648,9 @@ msg(int priority, struct context *contex
va_list ap;
char msg[8192];
@@ -26,28 +26,27 @@
va_start(ap, fmt);
if (context != NULL)
snprintf(msg, sizeof(msg), "%s [%s]: ", context->host_name,
-@@ -682,15 +687,19 @@
+@@ -684,6 +689,7 @@ main(int argc, char **argv)
{
- int ch;
+ int ch, maskpri = LOG_INFO;
const char *oconn = OCONN;
+ const char *pid_file_name = OPID;
const char *user = USER;
const char *jail = NULL;
sfsistat r = MI_FAILURE;
- const char *ofile = NULL;
-
+@@ -691,8 +697,10 @@ main(int argc, char **argv)
+ const char *pgroup = NULL;
+ const char *puser = NULL;
+ mode_t pperm = 0600;
+ pid_t pid;
+ FILE *pid_fd = NULL;
-+
- tzset();
- openlog("milter-regex", LOG_PID | LOG_NDELAY, LOG_DAEMON);
-- while ((ch = getopt(argc, argv, "c:dj:l:m:p:u:")) != -1) {
-+ while ((ch = getopt(argc, argv, "c:dj:l:m:p:qr:u:")) != -1) {
+- while ((ch = getopt(argc, argv, "c:dj:l:m:p:u:G:P:U:")) != -1) {
++ while ((ch = getopt(argc, argv, "c:dj:l:m:p:qr:u:G:P:U:")) != -1) {
switch (ch) {
case 'c':
rule_file_name = optarg;
-@@ -710,6 +719,12 @@
+@@ -712,6 +720,12 @@ main(int argc, char **argv)
case 'p':
oconn = optarg;
break;
@@ -60,11 +59,8 @@
case 'u':
user = optarg;
break;
-@@ -782,9 +797,22 @@
- perror("daemon");
- goto done;
+@@ -833,6 +847,20 @@ main(int argc, char **argv)
}
-- umask(0177);
msg(LOG_INFO, NULL, "started: %s", rcsid);
+