From 242dfd9cc6901a5e02dae94acdecdb91e78ea07c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 19 Jun 2000 23:05:32 +0000 Subject: [PATCH] 261 [func] Add dns_zone_markdirty(). --- CHANGES | 2 ++ lib/dns/include/dns/zone.h | 9 +++++++++ lib/dns/zone.c | 11 ++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 2aaee7610e..992eb6ca1b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ + 261 [func] Add dns_zone_markdirty(). + 260. [bug] Running named as a non-root user failed on Linux kernels new enough to support retaining capabilities after setuid(). diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h index 0f6c2b5a49..adaf1bc49b 100644 --- a/lib/dns/include/dns/zone.h +++ b/lib/dns/include/dns/zone.h @@ -287,6 +287,15 @@ dns_zone_setdbtype(dns_zone_t *zone, const char *db_type); * ISC_R_SUCCESS */ +void +dns_zone_markdirty(dns_zone_t *zone); +/* + * Mark a zone as 'dirty'. + * + * Require: + * 'zone' to be a valid zone. + */ + void dns_zone_expire(dns_zone_t *zone); /* diff --git a/lib/dns/zone.c b/lib/dns/zone.c index e2d8f98fa5..666295b98e 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: zone.c,v 1.148 2000/06/15 17:40:18 gson Exp $ */ +/* $Id: zone.c,v 1.149 2000/06/19 23:05:30 marka Exp $ */ #include @@ -1381,6 +1381,15 @@ dns_zone_maintenance(dns_zone_t *zone) { (void) zone_settimer(zone, now); } +void +dns_zone_markdirty(dns_zone_t *zone) { + REQUIRE(DNS_ZONE_VALID(zone)); + + LOCK(&zone->lock); + zone->flags |= DNS_ZONEFLG_NEEDDUMP; + UNLOCK(&zone->lock); +} + void dns_zone_expire(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone));