chiark / gitweb /
core: use raw_clone instead of fork in signal handler
[elogind.git] / src / core / load-fragment.c
index 259323bd5cd035a76d1b0fbf27af07f93e5c9f4f..358d36beb69deace4f8a220c71c9030ed7857be0 100644 (file)
@@ -601,8 +601,10 @@ int config_parse_exec(const char *unit,
                 FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                         if (strneq(word, ";", MAX(l, 1U)))
                                 break;
-                        else if (strneq(word, "\\;", MAX(l, 1U)))
+                        else if (strneq(word, "\\;", MAX(l, 1U))) {
                                 word ++;
+                                l --;
+                        }
 
                         if (honour_argv0 && word == rvalue) {
                                 assert(!path);
@@ -3066,7 +3068,7 @@ int config_parse_runtime_directory(
                 if (!n)
                         return log_oom();
 
-                if (!filename_is_safe(n)) {
+                if (!filename_is_valid(n)) {
                         log_syntax(unit, LOG_ERR, filename, line, EINVAL,
                                    "Runtime directory is not valid, ignoring assignment: %s", rvalue);
                         continue;
@@ -3586,7 +3588,7 @@ int unit_load_fragment(Unit *u) {
                 return r;
 
         /* Try to find an alias we can load this with */
-        if (u->load_state == UNIT_STUB)
+        if (u->load_state == UNIT_STUB) {
                 SET_FOREACH(t, u->names, i) {
 
                         if (t == u->id)
@@ -3599,6 +3601,7 @@ int unit_load_fragment(Unit *u) {
                         if (u->load_state != UNIT_STUB)
                                 break;
                 }
+        }
 
         /* And now, try looking for it under the suggested (originally linked) path */
         if (u->load_state == UNIT_STUB && u->fragment_path) {
@@ -3628,7 +3631,7 @@ int unit_load_fragment(Unit *u) {
                 if (r < 0)
                         return r;
 
-                if (u->load_state == UNIT_STUB)
+                if (u->load_state == UNIT_STUB) {
                         SET_FOREACH(t, u->names, i) {
                                 _cleanup_free_ char *z = NULL;
 
@@ -3646,6 +3649,7 @@ int unit_load_fragment(Unit *u) {
                                 if (u->load_state != UNIT_STUB)
                                         break;
                         }
+                }
         }
 
         return 0;