mirror of
https://github.com/samba-team/samba.git
synced 2025-01-17 02:05:21 +03:00
556b114f11
On Linux, gettimeofday() uses the clock's microsecond field to adjust the returned time in seconds, while time() only takes the seconds field into account. As a result, time() would occasionally return a smaller value than gettimeofday(), despite being called later. Changing the time() calls to gettimeofday() as used in audit_logging.c makes the time values consistent. https://stackoverflow.com/questions/22917318/time-and-gettimeofday-return-different-seconds Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue May 11 07:03:35 UTC 2021 on sn-devel-184