chiark / gitweb /
systemctl: don't show cgroup field for a unit if cgroup is empty
[elogind.git] / src / shared / conf-parser.c
index 68ab80470e5348ae0d7c0cc160edb74f136324d0..9f5c07c761e2670ab75ca92676a8badcc6682cf8 100644 (file)
@@ -593,7 +593,7 @@ int config_parse_string(
         assert(rvalue);
         assert(data);
 
-        n = cunescape(rvalue);
+        n = strdup(rvalue);
         if (!n)
                 return -ENOMEM;
 
@@ -865,7 +865,7 @@ int config_parse_mode(
 
         errno = 0;
         l = strtol(rvalue, &x, 8);
-        if (!x || *x || errno) {
+        if (!x || x == rvalue || *x || errno) {
                 log_error("[%s:%u] Failed to parse mode value, ignoring: %s", filename, line, rvalue);
                 return 0;
         }