[sudo-commits] sudo changeset 9921:cd04a21af4c5
Todd C. Miller
Todd.Miller at courtesan.com
Wed Feb 25 07:10:24 MST 2015
changeset: 9921:cd04a21af4c5 in /media/repos/sudo
details: http://www.sudo.ws/repos/sudo/rev/cd04a21af4c5
user: Todd C. Miller <Todd.Miller at courtesan.com>
date: Tue Feb 24 11:19:21 2015 -0700
Log Message:
We cannot (easily) use clock_gettime(CLOCK_MONOTONIC) directly as
it may be present but not implemented. Add sudo_gettime_real() and
sudo_gettime_mono() functions to get the real and monotonic times
respectively. Now sudo_gettime_mono() checks the value of
sysconf(_SC_MONOTONIC_CLOCK) before calling clock_gettime(CLOCK_MONOTONIC)
and falls back on sudo_gettime_real() as needed. The Mach version
of sudo_gettime_mono() uses mach_absolute_time().
This should fix problems with timestamp files on systems where
the CLOCK_MONOTONIC is defined but not actually implemented.
diffstat:
MANIFEST | 2 +-
configure | 15 ----
configure.ac | 3 -
include/sudo_compat.h | 11 ---
lib/util/Makefile.in | 3 -
lib/util/clock_gettime.c | 80 ------------------------
mkdep.pl | 2 +-
plugins/sudoers/Makefile.in | 6 +-
plugins/sudoers/gettime.c | 132 +++++++++++++++++++++++++++++++++++++++++
plugins/sudoers/po/sudoers.pot | 58 +++++++++--------
plugins/sudoers/sudoers.h | 4 +
plugins/sudoers/timestamp.c | 17 +----
12 files changed, 178 insertions(+), 155 deletions(-)
More information about the sudo-commits
mailing list