pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mail/srs-milter
Module Name: pkgsrc
Committed By: manu
Date: Tue Aug 20 11:41:13 UTC 2024
Modified Files:
pkgsrc/mail/srs-milter: Makefile distinfo
pkgsrc/mail/srs-milter/patches: patch-srs-filter.c
Log Message:
Bugfix: do not write to PIDfile if open failed
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/mail/srs-milter/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/srs-milter/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/srs-milter/patches/patch-srs-filter.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mail/srs-milter/Makefile
diff -u pkgsrc/mail/srs-milter/Makefile:1.3 pkgsrc/mail/srs-milter/Makefile:1.4
--- pkgsrc/mail/srs-milter/Makefile:1.3 Thu Jun 13 15:22:14 2024
+++ pkgsrc/mail/srs-milter/Makefile Tue Aug 20 11:41:13 2024
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2024/06/13 15:22:14 manu Exp $
+# $NetBSD: Makefile,v 1.4 2024/08/20 11:41:13 manu Exp $
GITHUB_PROJECT= srs-milter
GITHUB_TAG= 3c44b13a10471df0361c08786c8826ea1d0ecc7b
DISTNAME= 3c44b13a10471df0361c08786c8826ea1d0ecc7b
PKGNAME= ${GITHUB_PROJECT}-20141121
-PKGREVISION= 10
+PKGREVISION= 11
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_GITHUB:=emsearcy/}
DIST_SUBDIR= ${GITHUB_PROJECT}
Index: pkgsrc/mail/srs-milter/distinfo
diff -u pkgsrc/mail/srs-milter/distinfo:1.2 pkgsrc/mail/srs-milter/distinfo:1.3
--- pkgsrc/mail/srs-milter/distinfo:1.2 Thu Jun 13 15:22:14 2024
+++ pkgsrc/mail/srs-milter/distinfo Tue Aug 20 11:41:13 2024
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2024/06/13 15:22:14 manu Exp $
+$NetBSD: distinfo,v 1.3 2024/08/20 11:41:13 manu Exp $
BLAKE2s (srs-milter/3c44b13a10471df0361c08786c8826ea1d0ecc7b-3c44b13a10471df0361c08786c8826ea1d0ecc7b.zip) = e62ffea86976769bda9e0af3d64a52dd57901bf2130b7b8d39a7741d2731bfa0
SHA512 (srs-milter/3c44b13a10471df0361c08786c8826ea1d0ecc7b-3c44b13a10471df0361c08786c8826ea1d0ecc7b.zip) =
91db41b5fd955a1856ce1b30ec2ceaac2483820b3c1cc29e9817460633f3013401b416bb98e76fd5bf41492836b8dea42ea46689c4544d021a1d65f234c80112
Size (srs-milter/3c44b13a10471df0361c08786c8826ea1d0ecc7b-3c44b13a10471df0361c08786c8826ea1d0ecc7b.zip) = 15843 bytes
-SHA1 (patch-srs-filter.c) = bca45c18873469bdb8e1875b1c75ad0945774df9
+SHA1 (patch-srs-filter.c) = cc325793be76bd08ced8458563ede50451604bf6
Index: pkgsrc/mail/srs-milter/patches/patch-srs-filter.c
diff -u pkgsrc/mail/srs-milter/patches/patch-srs-filter.c:1.2 pkgsrc/mail/srs-milter/patches/patch-srs-filter.c:1.3
--- pkgsrc/mail/srs-milter/patches/patch-srs-filter.c:1.2 Thu Jun 13 15:22:14 2024
+++ pkgsrc/mail/srs-milter/patches/patch-srs-filter.c Tue Aug 20 11:41:13 2024
@@ -1,4 +1,4 @@
-$NetBSD: patch-srs-filter.c,v 1.2 2024/06/13 15:22:14 manu Exp $
+$NetBSD: patch-srs-filter.c,v 1.3 2024/08/20 11:41:13 manu Exp $
- Update pidfile after forking
- Process addresses with or without enclosing brackets
@@ -210,7 +210,7 @@ $NetBSD: patch-srs-filter.c,v 1.2 2024/0
if (cd->sender)
free(cd->sender);
-@@ -669,8 +737,17 @@
+@@ -669,8 +737,23 @@
syslog(LOG_ERR, "exiting parent process");
exit(EXIT_SUCCESS);
}
@@ -219,16 +219,22 @@ $NetBSD: patch-srs-filter.c,v 1.2 2024/0
+ if (CONFIG_pidfile) {
+ FILE *f;
+
-+ f = fopen(CONFIG_pidfile, "w");
-+ fprintf(f, "%i", (int) getpid());
-+ fclose(f);
++ /* Remove stale file */
++ (void)unlink(CONFIG_pidfile);
++
++ if ((f = fopen(CONFIG_pidfile, "w")) != NULL) {
++ fprintf(f, "%i", (int) getpid());
++ fclose(f);
++ } else {
++ syslog(LOG_ERR, "Cannot write PID to %s", CONFIG_pidfile);
++ }
+ }
+
/* Change the file mode mask */
umask(0);
/* Open any logs here */
-@@ -717,17 +794,27 @@
+@@ -717,17 +800,27 @@
printf(" -s, --socket\n");
printf(" {unix|local}:/path/to/file -- a named pipe.\n");
printf(" inet:port@{hostname|ip-address} -- an IPV4 socket.\n");
@@ -256,7 +262,7 @@ $NetBSD: patch-srs-filter.c,v 1.2 2024/0
printf(" our SRS domain name\n");
printf(" -c, --srs-secret\n");
printf(" secret string for SRS hashing algorithm\n");
-@@ -770,12 +857,16 @@
+@@ -770,12 +863,16 @@
{"debug", no_argument, 0, 'd'},
{"verbose", no_argument, 0, 'v'},
{"pidfile", required_argument, 0, 'P'},
@@ -273,7 +279,7 @@ $NetBSD: patch-srs-filter.c,v 1.2 2024/0
{"spf-heloname", required_argument, 0, 'l'},
{"spf-address", required_argument, 0, 'a'},
{"srs-domain", required_argument, 0, 'o'},
-@@ -791,9 +882,9 @@
+@@ -791,9 +888,9 @@
};
/* getopt_long stores the option index here. */
int option_index = 0;
@@ -284,7 +290,7 @@ $NetBSD: patch-srs-filter.c,v 1.2 2024/0
/* Detect the end of the options. */
if (c == -1)
-@@ -823,17 +914,22 @@
+@@ -823,17 +920,22 @@
CONFIG_verbose = 1;
break;
@@ -308,7 +314,7 @@ $NetBSD: patch-srs-filter.c,v 1.2 2024/0
if (optarg == NULL || *optarg == '\0') {
fprintf(stderr, "ERROR: illegal timeout %s\n", optarg);
exit(EXIT_FAILURE);
-@@ -851,8 +947,12 @@
+@@ -851,8 +953,12 @@
case 'r':
CONFIG_reverse = 1;
break;
@@ -321,7 +327,7 @@ $NetBSD: patch-srs-filter.c,v 1.2 2024/0
i = 0;
if (!CONFIG_domains) {
CONFIG_domains = (char **) malloc((i+2)*sizeof(char *));
-@@ -863,8 +963,16 @@
+@@ -863,8 +969,16 @@
CONFIG_domains[i] = optarg;
CONFIG_domains[i+1] = NULL;
break;
@@ -338,7 +344,7 @@ $NetBSD: patch-srs-filter.c,v 1.2 2024/0
CONFIG_spf_check = 1;
break;
-@@ -941,8 +1049,32 @@
+@@ -941,8 +1055,32 @@
printf ("%s ", argv[optind++]);
putchar ('\n');
}
Home |
Main Index |
Thread Index |
Old Index