summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-22 02:47:29 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-22 03:05:34 +0100
commit90060676c442604780634c0a993e3f9c3733f8e6 (patch)
treeb9a4ea6ffee5bcffdf63f3034f7c460f5559c30f /src/core/load-fragment.c
parent1620510ada018f1e1f0be114714826f6698501f2 (diff)
cgroup: Extend DeviceAllow= syntax to whitelist groups of devices, not just particular devices nodes
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index e74a790e25..5b1e990921 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -2368,9 +2368,10 @@ int config_parse_device_allow(
if (!path)
return log_oom();
- if (!path_startswith(path, "/dev")) {
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Invalid device node path '%s'. Ignoring.", path);
+ if (!startswith(path, "/dev/") &&
+ !startswith(path, "block-") &&
+ !startswith(path, "char-")) {
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid device node path '%s'. Ignoring.", path);
return 0;
}
@@ -2379,8 +2380,7 @@ int config_parse_device_allow(
m = "rwm";
if (!in_charset(m, "rwm")) {
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Invalid device rights '%s'. Ignoring.", m);
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid device rights '%s'. Ignoring.", m);
return 0;
}