Commit Graph

4626 Commits

Author SHA1 Message Date
Todd C. Miller
705d230739 Use fromdate and todate as the keywords instead of from and to; the short
forms will still be accepted.
2009-09-16 13:36:29 +00:00
Todd C. Miller
f2b3a0e6cd Fix reading long liensin sudo_getln() 2009-09-16 12:01:32 +00:00
Todd C. Miller
a418f78117 Log the cwd in the script log file.
Add sudo_getln() to read arbitrarily long lines.
2009-09-16 11:49:40 +00:00
Todd C. Miller
28b3a18137 Move get_timestr() into its own source file so sudoreplay can use it. 2009-09-16 11:48:34 +00:00
Todd C. Miller
789d716017 Add to and from perdicates (date ranges); needs documentation 2009-09-15 00:24:43 +00:00
Todd C. Miller
8589fccae9 Fix warning and add generated getdate.c 2009-09-14 13:19:47 +00:00
Todd C. Miller
8c7750931f Add getdate.y to be used for sudoreplay date parsing. 2009-09-14 13:16:06 +00:00
Todd C. Miller
65500fa959 Check more than just the first character of a predicate 2009-09-13 22:36:34 +00:00
Todd C. Miller
5acbff40a2 Add examples, sort predicates 2009-09-13 22:30:48 +00:00
Todd C. Miller
3724c2e900 Implement search expressions in sudoreplay similar in concept to
what find or tcpdump uses.  TODO: date ranges
2009-09-13 22:02:07 +00:00
Todd C. Miller
10fa87dfa8 Remove vhangup as it was hanging up the wrong tty. Should really
vhangup in the child after it as set its tty.
2009-09-07 15:07:48 +00:00
Todd C. Miller
bd9854db50 Fix cut at documenting transcript support. 2009-09-07 14:21:09 +00:00
Todd C. Miller
0040571c97 ID= -> TSID= for transcript ID 2009-09-07 14:18:06 +00:00
Todd C. Miller
95c41c8973 Move fast_glob description to where it belongs in sorted order 2009-09-06 16:30:50 +00:00
Todd C. Miller
927e98e29f Rename script -> transcript 2009-09-06 13:28:36 +00:00
Todd C. Miller
c8fc35b0a6 Add timeradd and timersub for those without them 2009-09-03 23:53:06 +00:00
Todd C. Miller
c1fe4492f4 Sanity check sessid before using it. 2009-09-03 23:27:24 +00:00
Todd C. Miller
f80fa34e74 Only set the session id if we are running a command or editing a file. 2009-09-03 23:26:05 +00:00
Todd C. Miller
568c99b099 Actually. qsort is fine since most versions fal back to a cheaper
sort when the number of elements to sort is small (like in our case).
2009-09-03 13:21:43 +00:00
Todd C. Miller
2935e2a5ba Check for dup2 and use dup instead if we don't have it. 2009-09-03 11:28:07 +00:00
Todd C. Miller
c57b8bb7b3 Move the code to dup2 the script fds to low numbered descriptors into
script_duplow() and fix the fd sorting.
2009-09-03 10:36:02 +00:00
Todd C. Miller
ad9ab8dab2 Move script_setup() back to immediately before we drop privs and
call the new script_nextid() in its place, which will set
sudo_user.sessid for the logging functions.
2009-09-03 10:21:18 +00:00
Todd C. Miller
9329149032 Install sudoreplay 2009-09-01 20:03:07 +00:00
Todd C. Miller
f798228a7f remove unused variable 2009-09-01 19:53:41 +00:00
Todd C. Miller
6184eb9461 Log the session ID, if there is one. Currently logs ID=XXXXXX, perhaps
should be SESSIONID or SESSID.
2009-08-30 15:18:50 +00:00
Todd C. Miller
5181d496c4 Add sudoreplay docs 2009-08-30 14:56:18 +00:00
Todd C. Miller
7ae1dae376 add -V (version) flag 2009-08-30 14:50:51 +00:00
Todd C. Miller
5dd8fe2fee Hook up max_wait. 2009-08-30 14:11:04 +00:00
Todd C. Miller
b9f38b2aca Use base36 number for the ID and store script files with paths like
/var/log/sudo-session/00/00/00{,.tim,.scr}.
This gives us 36^6 (2,176,782,336) unique IDs.
2009-08-30 11:22:53 +00:00
Todd C. Miller
6ae9dae82a Add check for regcomp 2009-08-23 23:52:23 +00:00
Todd C. Miller
9efd18b1bb Add support for selecting by pattern and tty when listing. 2009-08-23 13:33:26 +00:00
Todd C. Miller
30cfb7160e The beginnings of a list mode. 2009-08-17 14:17:08 +00:00
Todd C. Miller
051eab7507 fix pasto 2009-08-16 15:16:04 +00:00
Todd C. Miller
7a00c5257c Add scaffolding for building sudoreplay 2009-08-16 15:13:31 +00:00
Todd C. Miller
20ad41f4d8 include error.h
first arg to nanotime is const
2009-08-16 15:12:16 +00:00
Todd C. Miller
e4be175113 Initial cut at sudoreplay; replay a sudo session. 2009-08-16 14:58:13 +00:00
Todd C. Miller
946ea4c970 Fix wait() usage and use correct wait status. 2009-08-08 20:00:17 +00:00
Todd C. Miller
0ab5c31ee0 Add protos for term_* to sudo.h 2009-08-08 12:56:02 +00:00
Todd C. Miller
40a21a6c75 Fix detection of the child process exiting. Since the child is in
its own session we should only ever get SIGCHLD for that process but
better safe than sorry.
2009-08-08 12:55:43 +00:00
Todd C. Miller
834e817fa4 Add UNIX98 pty support. 2009-08-08 00:29:30 +00:00
Todd C. Miller
c3c6c299e3 Add UNIX98 pty support. 2009-08-08 00:26:13 +00:00
Todd C. Miller
92dcfa8963 For raw mode, don't bother clearing BRKINT or PARMRK and clear IUCLC
if it is defined.
2009-08-07 21:06:54 +00:00
Todd C. Miller
3bc3a2e85a Set PAM_RUSER and PAM_RHOST early so they can be used during authentication.
Based on a patch from Jamie Beverly.
2009-08-07 14:21:51 +00:00
Todd C. Miller
fde79c46fb Close dir before returning if strlcpy() reports overflow.
From Martynas Venckus.
2009-08-07 13:25:22 +00:00
Todd C. Miller
ee20527bf0 On Linux, the openpty proto libes in pty.h 2009-08-07 13:23:07 +00:00
Todd C. Miller
51793254ed Call vhangup on exit if the system has it
Use setpgrp() if no setsid()
2009-08-07 13:09:09 +00:00
Todd C. Miller
b3458ec09c Add checks for revoke and vhangup if we don't have openpty 2009-08-06 15:53:21 +00:00
Todd C. Miller
ee45ce4db5 Session logging guts that got forgotten in the previous commit. 2009-08-06 15:51:12 +00:00
Todd C. Miller
3bfce30a85 First cut at session logging for sudo. Still need to write get_pty()
for Unix 98 and old-style BSD ptys.  Also needs documentation and
general cleanup.
2009-08-06 00:04:14 +00:00
Todd C. Miller
334c19a405 Fix a bug introduced with def_closefrom. The value of def_closefrom
already includes the +1.
2009-08-05 23:59:21 +00:00