X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Futil.c;h=58f67b0d15b86b860ca2bb9bbe08ac8d40541b53;hb=3e33a44a01078ea0699dca160b93f0399fbc994b;hp=434f311e71f9cdbbdafe85229fdeb653f0b22965;hpb=f601daa70143745915a8d38603969f228414af19;p=elogind.git diff --git a/src/util.c b/src/util.c index 434f311e7..58f67b0d1 100644 --- a/src/util.c +++ b/src/util.c @@ -1681,6 +1681,8 @@ bool ignore_file(const char *filename) { return filename[0] == '.' || streq(filename, "lost+found") || + streq(filename, "aquota.user") || + streq(filename, "aquota.group") || endswith(filename, "~") || endswith(filename, ".rpmnew") || endswith(filename, ".rpmsave") || @@ -3333,6 +3335,10 @@ bool null_or_empty(struct stat *st) { return false; } +DIR *xopendirat(int fd, const char *name) { + return fdopendir(openat(fd, name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)); +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime",