Todd C. Miller
1e5e5fb440
No longer store the ctime of a devpts tty. The handling of ctime
...
on devpts in Linux has been changed to conform to POSIX. As a
result we can no longer assume that the ctime will stay unchanged
throughout the life of the session. We store the session ID in the
time stamp file so there is a much smaller chance of the time stamp
file being reused by a new login. While here, store the uid/gid
in the timestamp file too for good measure.
2013-05-03 16:14:12 -04:00
Todd C. Miller
95b50f84af
Use time(&now) instead of now = time(NULL) when storing the current
...
time in a time_t (better compiler error checking).
Better parsing and printing of 64-bit time_t on 32-bit platforms.
2013-04-23 13:15:22 -04:00
Todd C. Miller
1162b55040
Rename log_error() -> log_warning() for consistency with warning()/fatal()
2013-04-18 14:14:03 -04:00
Todd C. Miller
39acd2fcba
Rename error/errorx -> fatal/fatalx and remove the exit value as
...
it was always 1.
2013-04-18 14:07:59 -04:00
Todd C. Miller
5555b86d7e
Log timestampfile to debug file.
2013-04-09 14:17:59 -04:00
Todd C. Miller
4d3fc204f7
Pass auth_pw to the timestamp functions.
2013-03-28 13:22:09 -04:00
Todd C. Miller
8b4c192058
Move contents of timestamp.h into check.h.
2013-03-25 11:28:21 -04:00
Todd C. Miller
04b25a8bcd
Completely ignore time stamp file if it is set to the epoch,
...
regardless of what gettimeofday() returns.
2013-02-21 10:05:16 -05:00
Todd C. Miller
2e08777f25
Store the session ID in the tty ticket file too. A tty may only
...
be in one session at a time so if the session ID doesn't match we
ignore the ticket.
2013-02-08 10:43:14 -05:00
Todd C. Miller
1d7072fe09
Don't include <sys/param.h>. We only needed it for MAXPATHLEN,
...
MAXHOSTNAMELEN and the MIN/MAX macros. We now use PATH_MAX and
HOST_NAME_MAX throughout without falling back on MAXPATHLEN or
MAXHOSTNAMELEN and define our own MIN/MAX macros as needed.
2012-12-04 10:40:47 -05:00
Todd C. Miller
56de023de8
Avoid strerror() when possible and just rely on warning/error
...
to handle errno in the proper locale.
2012-11-09 16:32:29 -05:00
Todd C. Miller
a0c53bd751
Call gettext inside log_error et al instead of having the caller do it. This way we can display any messages to the user in their own locale but log in the sudoers local.
2012-11-08 15:37:44 -05:00
Todd C. Miller
0a7af23038
Make check.c independent of the underlying timestamp implementation.
2012-10-23 14:16:57 -04:00
Todd C. Miller
0fa33ccf0f
Split off timestamp functions into their own source file.
2012-09-27 10:21:13 -04:00