summaryrefslogtreecommitdiff
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-03-05 14:58:56 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2015-03-05 16:14:07 +0100
commit6487ada88d63e4998113f4c57fa10b7c865f8026 (patch)
tree6f879c7d0e4f55ea4b2f45f679abead6a8ea1d81 /src/tmpfiles
parent6437edbebe80e68b782f178c7a76e870a53811d7 (diff)
tmpfiles: Fix handling of duplicate lines
Commit 3f93da987 accidentally dropped the "return 0" after detection of a duplicate line. Put it back, to get back the documented and intended "first match wins" behaviour. https://launchpad.net/bugs/1428540
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 917bb3c528..652fe5f229 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1746,9 +1746,11 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
unsigned n;
for (n = 0; n < existing->count; n++) {
- if (!item_compatible(existing->items + n, &i))
+ if (!item_compatible(existing->items + n, &i)) {
log_warning("[%s:%u] Duplicate line for path \"%s\", ignoring.",
fname, line, i.path);
+ return 0;
+ }
}
} else {
existing = new0(ItemArray, 1);