+ }
+
+ /* read dynamic rules directory */
+ strlcpy(filename, udev_root, sizeof(filename));
+ strlcat(filename, "/"RULES_DYN_DIR, sizeof(filename));
+ if (stat(filename, &statbuf) != 0) {
+ create_path(filename);
+ selinux_setfscreatecon(filename, NULL, S_IFDIR|0755);
+ mkdir(filename, 0755);
+ selinux_resetfscreatecon();
+ }
+ add_matching_files(&dyn_list, filename, RULESFILE_SUFFIX);
+
+ /* sort dynamic rules files by basename into list of files */
+ list_for_each_entry_safe(dyn_loop, dyn_tmp, &dyn_list, node) {
+ const char *dyn_base = strrchr(dyn_loop->name, '/');
+
+ if (dyn_base == NULL)
+ continue;