summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2009-04-21 17:22:24 +0000
committerNathan Kinder <nkinder@redhat.com>2009-04-21 17:22:24 +0000
commit5d3d883251dd15cf719181e33fb6954454869822 (patch)
tree063e21618756aa3c42cd70d290a93b3ade8cd00c
parent11a991f265f7676b3fceb22cdf05634d78f36a50 (diff)
downloadds-5d3d883251dd15cf719181e33fb6954454869822.tar.gz
ds-5d3d883251dd15cf719181e33fb6954454869822.tar.xz
ds-5d3d883251dd15cf719181e33fb6954454869822.zip
Resolves: 496836
Summary: Corrected semaphore name used in SNMP subagent.
-rw-r--r--ldap/servers/snmp/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ldap/servers/snmp/main.c b/ldap/servers/snmp/main.c
index 4e249f53..89732faf 100644
--- a/ldap/servers/snmp/main.c
+++ b/ldap/servers/snmp/main.c
@@ -357,10 +357,10 @@ load_config(char *conf_path)
}
/* set the semaphore name */
- /* ".stats" + \0 = 7 */
- serv_p->stats_sem_name = malloc(strlen(p) + 7);
+ /* "/" + ".stats" + \0 = 8 */
+ serv_p->stats_sem_name = malloc(strlen(p) + 8);
if (serv_p->stats_sem_name != NULL) {
- snprintf(serv_p->stats_sem_name, strlen(p) + 7, "%s.stats", p);
+ snprintf(serv_p->stats_sem_name, strlen(p) + 8, "/%s.stats", p);
} else {
printf("ldap-agent: malloc error processing config file\n");
error = 1;