lib/libdsa/dsalib_location.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 7aaec2d20d9dbed528244a68bfff89dd4c45e241
Author: Ludwig <lkrispen(a)elkris2.redhat.com>
Date: Thu Oct 17 14:17:10 2013 +0200
Ticket 47563 - cannot restart directory server from console
Bug Description: code does not handle syconfig file in systemd format
Fix Description: parsing the run dir string handle lines with/out ";"
https://fedorahosted.org/389/ticket/47563
Reviewed by: RichM
diff --git a/lib/libdsa/dsalib_location.c b/lib/libdsa/dsalib_location.c
index e4104da..83d8682 100644
--- a/lib/libdsa/dsalib_location.c
+++ b/lib/libdsa/dsalib_location.c
@@ -149,11 +149,13 @@ ds_get_run_dir()
start++;
if ((p = strrchr(start, ';'))) {
*p = '\0';
- for (--p; isspace(*p); p--) {
- *p = '\0';
- }
- PR_snprintf(rundir, sizeof(rundir), "%s", start);
+ } else {
+ p = start + strlen(start);
+ }
+ for (--p; isspace(*p); p--) {
+ *p = '\0';
}
+ PR_snprintf(rundir, sizeof(rundir), "%s", start);
}
break;
}