Todd C. Miller
f5c5a9bf6a
Do not update tty ticket if there is no tty.
2010-06-18 08:00:16 -06:00
Todd C. Miller
eec336115a
Move askpass path specification from sudoers to sudo.conf.
2010-06-09 17:40:44 -04:00
Todd C. Miller
79f178923e
Replace timerfoo macros with timevalfoo since the timer macros are known
...
to be busted on some systems.
2010-06-08 18:38:23 -04:00
Todd C. Miller
8fa9464d0c
Update copyright year and fix whitespace
2010-06-04 09:09:39 -04:00
Todd C. Miller
7ce0dfc61b
Enable tty_is_devpts() support for Solaris with the "devices" filesystem.
2010-06-02 14:30:13 -04:00
Todd C. Miller
a331dcb46a
If the tty lives on a devpts filesystem, stash the ctime in the tty
...
ticket file, as it is not updated when the tty is written to.
This helps us determine when a tty has been reused without the
user authenticating again with sudo.
2010-05-11 14:25:14 -04:00
Todd C. Miller
b89980ac6e
Fix timestamp removal with -k/-K
2010-05-11 13:08:41 -04:00
Todd C. Miller
af092dc406
Fix typo in last commit (ifndef vs ifdef)
...
Make sure we pass ctime() a pointer to time_t as tv_sec in struct
timeval may be long.
2010-04-24 19:22:52 -04:00
Todd C. Miller
17220f44d6
Don't stash ctime in on-disk tty ticket info for now; on many (most?)
...
systems the ctime is updated when the tty is written to. Once I
have a better idea of what systems do not update ctime on ttys (and
have a way to test for this) the ctime stash will be conditionally
re-enabled.
2010-04-24 19:05:11 -04:00
Todd C. Miller
f7f9def5ef
Lock the tty timestamp when writing. We shouldn't have to lock when
...
reading since the file is updated via a single write system call.
2010-04-23 05:56:24 -04:00
Todd C. Miller
05ae3ea6cb
Convert to ANSI C function declarations
2010-04-22 18:09:53 -04:00
Todd C. Miller
6a27866c30
get_boottime() now fills in a timeval struct
2010-04-22 10:33:16 -04:00
Todd C. Miller
7d6941a820
Store info from stat(2)ing the tty in the tty ticket when tty tickets
...
are in use. On most systems, this closes the loophole whereby a user
can log out of a tty, log back in and still have the timestamp be valid.
2010-04-22 10:16:18 -04:00
Todd C. Miller
b4a26b7691
Use timeval directly instead of converting to timespec when dealing
...
with file times and time of day.
2010-04-20 16:44:02 -04:00
Todd C. Miller
744eae82e7
Primitive set/restore permissions. Will be replaced by a push/pop
...
model.
2010-04-10 10:34:37 -04:00
Todd C. Miller
b4f4afdf69
Pass in output function to lbuf_init() instead of writing to stdout.
...
A side effect is that the usage info can now go to stderr as it should.
2010-03-18 06:42:17 -04:00
Todd C. Miller
d5ae4c7d87
Kill __P in sudoers
2010-03-17 19:56:27 -04:00
Todd C. Miller
51c55cd487
Use conversation function for lecture.
2010-03-16 07:41:41 -04:00
Todd C. Miller
cbf298bfc8
Don't update ticket file if verify_user returns FALSE.
2010-03-16 07:13:57 -04:00
Todd C. Miller
248bae4e56
Add support for -k flag with a command.
2010-03-15 19:41:15 -04:00
Todd C. Miller
9b0205846b
Initial bits of sudoers plugin; still needs work.
2010-03-14 19:58:47 -04:00
Todd C. Miller
d6187f5ad3
Replace emul/include.h with compat/include.h to match new source
...
tree layout.
2010-02-20 09:22:30 -05:00
Todd C. Miller
e90fa482f9
Rework source layout in preparation for modular sudo.
2010-02-20 09:14:01 -05:00