diff options
author | Martin Hedenfal <martinh@cvs.openbsd.org> | 2010-06-30 17:16:10 +0000 |
---|---|---|
committer | Martin Hedenfal <martinh@cvs.openbsd.org> | 2010-06-30 17:16:10 +0000 |
commit | ba0e6657f57d1712b07ec61ebd3860742362fb01 (patch) | |
tree | eb4c6adf19e79158fe1fc211a0adb469fea88361 /usr.sbin/ldapd/control.c | |
parent | 04a10dc7543e5c850a1cf5a093f2a1ffa5fa1c90 (diff) |
Don't send statistics for referral namespaces. This unbreaks ldapctl stats.
Avoid null pointer dereference when reopening a namespace.
Diffstat (limited to 'usr.sbin/ldapd/control.c')
-rw-r--r-- | usr.sbin/ldapd/control.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ldapd/control.c b/usr.sbin/ldapd/control.c index fb3a0226e7d..a5386775bc2 100644 --- a/usr.sbin/ldapd/control.c +++ b/usr.sbin/ldapd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.3 2010/06/27 16:24:17 martinh Exp $ */ +/* $OpenBSD: control.c,v 1.4 2010/06/30 17:16:09 martinh Exp $ */ /* * Copyright (c) 2010 Martin Hedenfalk <martin@bzero.se> @@ -191,6 +191,8 @@ send_stats(struct imsgev *iev) &stats, sizeof(stats)); TAILQ_FOREACH(ns, &conf->namespaces, next) { + if (namespace_has_referrals(ns)) + continue; strlcpy(nss.suffix, ns->suffix, sizeof(nss.suffix)); st = btree_stat(ns->data_db); bcopy(st, &nss.data_stat, sizeof(nss.data_stat)); |