chiark / gitweb /
test1: add service for testing priv dropping
[elogind.git] / util.c
diff --git a/util.c b/util.c
index 496f55166b7f35a1dad171fbe7c2541a97dd7fa8..e31649861d3b642b16396c99a1787cc8baaacc53 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1058,6 +1058,20 @@ char *ascii_strlower(char *path) {
         return p;
 }
 
+bool ignore_file(const char *filename) {
+        assert(filename);
+
+        return
+                filename[0] == '.' ||
+                endswith(filename, "~") ||
+                endswith(filename, ".rpmnew") ||
+                endswith(filename, ".rpmsave") ||
+                endswith(filename, ".rpmorig") ||
+                endswith(filename, ".dpkg-old") ||
+                endswith(filename, ".dpkg-new") ||
+                endswith(filename, ".swp");
+}
+
 static const char *const ioprio_class_table[] = {
         [IOPRIO_CLASS_NONE] = "none",
         [IOPRIO_CLASS_RT] = "realtime",