]> git.armaanb.net Git - opendoas.git/commitdiff
timestamp.c: remove warning for normal case v6.6.1
authorDuncan Overbruck <mail@duncano.de>
Mon, 3 Feb 2020 21:26:55 +0000 (22:26 +0100)
committerDuncan Overbruck <mail@duncano.de>
Mon, 3 Feb 2020 21:41:31 +0000 (22:41 +0100)
timestamp.c

index c7edb56409e109aea271e04b9ad51f5e5e21cfac..6b4354cc868739305019023e4b445a7b5f09ad26 100644 (file)
@@ -205,10 +205,9 @@ timestamp_check(int fd, int secs)
        if (st.st_uid != 0 || st.st_gid != getgid() || st.st_mode != (S_IFREG | 0000))
                errx(1, "timestamp uid, gid or mode wrong");
 
-       if (!timespecisset(&st.st_atim) || !timespecisset(&st.st_mtim)) {
-               warnx("timestamp atim or mtime not set");
+       /* this timestamp was created but never set, invalid but no error */
+       if (!timespecisset(&st.st_atim) || !timespecisset(&st.st_mtim))
                return 0;
-       }
 
        if (clock_gettime(CLOCK_BOOTTIME, &ts[0]) == -1 ||
            clock_gettime(CLOCK_REALTIME, &ts[1]) == -1) {