chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
core: support globbing matches in DeviceAllow= when checking for device groups
[elogind.git]
/
src
/
core
/
cgroup.c
diff --git
a/src/core/cgroup.c
b/src/core/cgroup.c
index 1327486509a6eaaf54af54119087f077f8429f42..18de888ba677b6d7ae7cc43ea46bd19bdda2acd1 100644
(file)
--- 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,