summaryrefslogtreecommitdiff
path: root/src/core/cgroup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-11 17:42:24 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-11 17:43:41 +0100
commite41969e3d1a8bda8b0b2f7eb012cef1c8835509a (patch)
tree6e1bc56a7fc9212e785265e9ee97888578d5e914 /src/core/cgroup.c
parent98b2f766b24c84fc49a4df954717b1f96bbce00d (diff)
core: support globbing matches in DeviceAllow= when checking for device groups
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r--src/core/cgroup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 132748650..18de888ba 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -20,6 +20,7 @@
***/
#include <fcntl.h>
+#include <fnmatch.h>
#include "path-util.h"
#include "special.h"
@@ -246,7 +247,8 @@ static int whitelist_major(const char *path, const char *name, char type, const
w++;
w += strspn(w, WHITESPACE);
- if (!streq(w, name))
+
+ if (fnmatch(name, w, 0) != 0)
continue;
sprintf(buf,