Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/external/bsd/blacklist/bin Pull up following revision(s) ...
details: https://anonhg.NetBSD.org/src/rev/487c96c1d591
branches: netbsd-7
changeset: 800407:487c96c1d591
user: snj <snj%NetBSD.org@localhost>
date: Mon Feb 12 18:30:22 2018 +0000
description:
Pull up following revision(s) (requested by christos in ticket #1548):
external/bsd/blacklist/bin/blacklistd.c: 1.35
external/bsd/blacklist/bin/state.c: 1.19
restore rules after the database is open, add error message to prevent
silent failure in the future. (Kurt Lidl)
diffstat:
external/bsd/blacklist/bin/blacklistd.c | 10 +++++-----
external/bsd/blacklist/bin/state.c | 8 +++++---
2 files changed, 10 insertions(+), 8 deletions(-)
diffs (68 lines):
diff -r 453c84a2508d -r 487c96c1d591 external/bsd/blacklist/bin/blacklistd.c
--- a/external/bsd/blacklist/bin/blacklistd.c Sat Feb 10 04:22:50 2018 +0000
+++ b/external/bsd/blacklist/bin/blacklistd.c Mon Feb 12 18:30:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: blacklistd.c,v 1.32.2.3 2015/08/07 04:10:23 snj Exp $ */
+/* $NetBSD: blacklistd.c,v 1.32.2.4 2018/02/12 18:30:22 snj Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include "config.h"
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: blacklistd.c,v 1.32.2.3 2015/08/07 04:10:23 snj Exp $");
+__RCSID("$NetBSD: blacklistd.c,v 1.32.2.4 2018/02/12 18:30:22 snj Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -470,9 +470,6 @@
flags |= O_TRUNC;
}
- if (restore)
- rules_restore();
-
struct pollfd *pfd = NULL;
bl_t *bl = NULL;
size_t nfd = 0;
@@ -497,6 +494,9 @@
if (state == NULL)
return EXIT_FAILURE;
+ if (restore)
+ rules_restore();
+
if (!debug) {
if (daemon(0, 0) == -1)
err(EXIT_FAILURE, "daemon failed");
diff -r 453c84a2508d -r 487c96c1d591 external/bsd/blacklist/bin/state.c
--- a/external/bsd/blacklist/bin/state.c Sat Feb 10 04:22:50 2018 +0000
+++ b/external/bsd/blacklist/bin/state.c Mon Feb 12 18:30:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: state.c,v 1.15.2.3 2015/08/07 04:10:23 snj Exp $ */
+/* $NetBSD: state.c,v 1.15.2.4 2018/02/12 18:30:22 snj Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: state.c,v 1.15.2.3 2015/08/07 04:10:23 snj Exp $");
+__RCSID("$NetBSD: state.c,v 1.15.2.4 2018/02/12 18:30:22 snj Exp $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -200,8 +200,10 @@
int rv;
DBT k, v;
- if (db == NULL)
+ if (db == NULL) {
+ (*lfun)(LOG_ERR, "%s: called with no database file", __func__);
return -1;
+ }
first = first ? R_FIRST : R_NEXT;
Home |
Main Index |
Thread Index |
Old Index