Browse Source

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
Ludwig Krispenz 13 years ago
parent
commit
2f1021c825
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ldap/servers/slapd/back-ldbm/monitor.c

+ 2 - 0
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,
         if (strncmp(mpfstat[i]->file_name, inst->inst_dir_name,
                     strlen(inst->inst_dir_name)) != 0)
                     strlen(inst->inst_dir_name)) != 0)
             continue;
             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
 	/* Since the filenames are now relative, we need to construct an absolute version
 	 * for the purpose of stat() etc below...
 	 * for the purpose of stat() etc below...