chiark / gitweb /
core: support globbing matches in DeviceAllow= when checking for device groups
[elogind.git] / src / core / cgroup.c
index 1327486509a6eaaf54af54119087f077f8429f42..18de888ba677b6d7ae7cc43ea46bd19bdda2acd1 100644 (file)
@@ -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,