From 8cfbcea2a467f14284a2c31568df8e75fcf27dab Mon Sep 17 00:00:00 2001 From: Ludwig Krispenz Date: Fri, 16 Nov 2012 16:58:35 +0100 Subject: [PATCH] Fix for ticket 465: cn=monitor showing stats for other db instances Check that part of the db file name that matches is the full db dir name --- ldap/servers/slapd/back-ldbm/monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ldap/servers/slapd/back-ldbm/monitor.c b/ldap/servers/slapd/back-ldbm/monitor.c index ee4f01a..1a06a25 100644 --- a/ldap/servers/slapd/back-ldbm/monitor.c +++ b/ldap/servers/slapd/back-ldbm/monitor.c @@ -196,6 +196,8 @@ int ldbm_back_monitor_instance_search(Slapi_PBlock *pb, Slapi_Entry *e, if (strncmp(mpfstat[i]->file_name, inst->inst_dir_name, strlen(inst->inst_dir_name)) != 0) continue; + if (mpfstat[i]->file_name[strlen(inst->inst_dir_name)] != get_sep(mpfstat[i]->file_name)) + continue; /* Since the filenames are now relative, we need to construct an absolute version * for the purpose of stat() etc below... -- 1.7.11.7