X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftmpfiles.c;h=984eaf0de192538f0209fa3880a8b03ab8f3f86d;hb=9a57c62944258c750d80bca4fe56de4dbab46d67;hp=120236c5cc07490f03724b694e77e831f9987f92;hpb=9c73736da85110ca73d141b5acff6f4989092c07;p=elogind.git diff --git a/src/tmpfiles.c b/src/tmpfiles.c index 120236c5c..984eaf0de 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -149,7 +149,7 @@ static int dir_cleanup( DIR *sub_dir; int q; - sub_dir = xopendirat(dirfd(d), dent->d_name); + sub_dir = xopendirat(dirfd(d), dent->d_name, O_NOFOLLOW); if (sub_dir == NULL) { if (errno != ENOENT) { log_error("opendir(%s/%s) failed: %m", p, dent->d_name); @@ -591,6 +591,12 @@ static int parse_line(const char *fname, unsigned line, const char *buffer, cons } if ((r = hashmap_put(items, i->path, i)) < 0) { + if (r == -EEXIST) { + log_warning("Two or more conflicting lines for %s configured, ignoring.", i->path); + r = 0; + goto finish; + } + log_error("Failed to insert item %s: %s", i->path, strerror(-r)); goto finish; }