From b2d1ad757cd7713a492c4d9c1a254d5cbdfc4034 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 14 May 2020 09:27:59 +0200 Subject: [PATCH] condition: when reading /etc/ modification timestamp, let's actualy compare it as-is Previously, we'd only compare the nsec component of it, which sounds needlessly fragile. Let's instead compare the timestamp as it is. --- src/shared/condition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/condition.c b/src/shared/condition.c index 4784c7db7d..2d9702d873 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -614,7 +614,7 @@ static int condition_test_needs_update(Condition *c, char **env) { return true; } - timespec_store(&other.st_mtim, timestamp); + return timespec_load_nsec(&usr.st_mtim) > timestamp; } return usr.st_mtim.tv_nsec > other.st_mtim.tv_nsec;