From: Todd C. Miller Date: Thu, 5 May 2016 22:30:11 +0000 (-0600) Subject: Ignore ts_write() return value when disabling an entry with a bogus X-Git-Tag: SUDO_1_8_17^2~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60e740dd60ab59c5d44284aea64db17dec341412;p=sudo Ignore ts_write() return value when disabling an entry with a bogus timestamp. We ignore the timestamp entry even it doesn't succeed. Coverity CID 104062. --- diff --git a/plugins/sudoers/timestamp.c b/plugins/sudoers/timestamp.c index 431c97e90..a2669fc4b 100644 --- a/plugins/sudoers/timestamp.c +++ b/plugins/sudoers/timestamp.c @@ -756,7 +756,7 @@ timestamp_status(void *vcookie, struct passwd *pw) N_("ignoring time stamp from the future")); status = TS_OLD; SET(entry.flags, TS_DISABLED); - ts_write(cookie->fd, cookie->fname, &entry, cookie->pos); + (void)ts_write(cookie->fd, cookie->fname, &entry, cookie->pos); } #else /* Check for bogus (future) time in the stampfile. */ @@ -769,7 +769,7 @@ timestamp_status(void *vcookie, struct passwd *pw) 4 + ctime(&tv_sec)); status = TS_OLD; SET(entry.flags, TS_DISABLED); - ts_write(cookie->fd, cookie->fname, &entry, cookie->pos); + (void)ts_write(cookie->fd, cookie->fname, &entry, cookie->pos); } #endif /* CLOCK_MONOTONIC */ } else {