chiark / gitweb /
mount: block creation of mount units for API file systems
[elogind.git] / src / load-fragment.c
index cb8c2508919c0b972d154a3bd2495b6965f9277e..8635bdb226b6eee2397ee290120fa122e1db703e 100644 (file)
@@ -30,6 +30,8 @@
 #include <sys/mount.h>
 #include <linux/fs.h>
 #include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/resource.h>
 
 #include "unit.h"
 #include "strv.h"
@@ -965,7 +967,9 @@ static int config_parse_limit(
         assert(rvalue);
         assert(data);
 
-        if (safe_atollu(rvalue, &u) < 0) {
+        if (streq(rvalue, "infinity"))
+                u = (unsigned long long) RLIM_INFINITY;
+        else if (safe_atollu(rvalue, &u) < 0) {
                 log_error("[%s:%u] Failed to parse resource value, ignoring: %s", filename, line, rvalue);
                 return 0;
         }
@@ -1853,6 +1857,7 @@ static int load_from_path(Unit *u, const char *path) {
                 { "ConditionDirectoryNotEmpty", config_parse_condition_path, CONDITION_DIRECTORY_NOT_EMPTY, u,                "Unit"    },
                 { "ConditionKernelCommandLine", config_parse_condition_string, CONDITION_KERNEL_COMMAND_LINE, u,              "Unit"    },
                 { "ConditionVirtualization",    config_parse_condition_string, CONDITION_VIRTUALIZATION, u,                   "Unit"    },
+                { "ConditionSecurity",          config_parse_condition_string, CONDITION_SECURITY, u,                         "Unit"    },
                 { "ConditionNull",          config_parse_condition_null,  0, u,                                               "Unit"    },
 
                 { "PIDFile",                config_parse_path,            0, &u->service.pid_file,                            "Service" },