Commit Graph

4803 Commits

Author SHA1 Message Date
Todd C. Miller
b008f3fda8 Add getline.o to COMMON_OBJS 2009-09-19 19:24:48 +00:00
Todd C. Miller
16a495c6c7 sudoreplay depends on libsudo.a 2009-09-19 19:21:18 +00:00
Todd C. Miller
6c4eea59e7 More pwutil.o into COMMON_OBJS 2009-09-19 19:15:34 +00:00
Todd C. Miller
e56d4af8fd Remove my_* redirection in pwutil.c for testsudoers and just use the normal
libc get{pw,gr}* names.
2009-09-19 19:13:10 +00:00
Todd C. Miller
2950b0c759 More time and date examples 2009-09-19 18:26:38 +00:00
Todd C. Miller
6794ef5323 Move nanosleep() emulation into its own file
Check librt.a for nanosleep if we don't find it in libc
2009-09-19 17:44:34 +00:00
Todd C. Miller
2752268c9b Build libsudo with the common bits and link things against that. 2009-09-19 17:21:14 +00:00
Todd C. Miller
f68a24fb3b Fix final flush. 2009-09-19 11:43:24 +00:00
Todd C. Miller
3223231b1f Keep reading from the pty master -> log file until read returns <= 0.
Do our best to write everything to stdout when flushing any remaining bits.
2009-09-19 11:35:20 +00:00
Todd C. Miller
7de6bbcfd5 Use unbuffered I/O when writing to stdout and make sure we write
the entire buffer.
2009-09-19 00:21:27 +00:00
Todd C. Miller
6744c573b9 Only use max_wait if it is non-zero 2009-09-18 14:53:51 +00:00
Todd C. Miller
b241a9e2d8 Need compat.h here 2009-09-18 13:18:56 +00:00
Todd C. Miller
680351cb9b Fix nanosleep emulation 2009-09-18 13:18:30 +00:00
Todd C. Miller
3cc02be8aa Fix comment after #endif 2009-09-18 13:18:03 +00:00
Todd C. Miller
b9f4db8951 Add protos for missing libc bits 2009-09-18 13:08:20 +00:00
Todd C. Miller
54e38658df add missing line continuation char 2009-09-18 13:04:14 +00:00
Todd C. Miller
f17c6df8e2 Implement getline() in terms of fgetln() if we have it. 2009-09-18 12:23:01 +00:00
Todd C. Miller
89fa08f7e6 Print year when formatting log line 2009-09-18 12:12:35 +00:00
Todd C. Miller
7011be08ea Document cwd, attempt to document time/date formats. 2009-09-18 02:05:41 +00:00
Todd C. Miller
fb0fb0380b Fix getline return value check. 2009-09-18 01:21:12 +00:00
Todd C. Miller
40114c9ba1 Use getline() if the system has it, else use provide our own for sudoreplay. 2009-09-18 01:16:56 +00:00
Todd C. Miller
798867ed27 Refactor code to update output and timing files. 2009-09-18 00:32:32 +00:00
Todd C. Miller
1a537514dc Make sudo_getln() behave more like glibc getline. 2009-09-17 10:22:03 +00:00
Todd C. Miller
74844b1787 When flushing remaining output, also update timing file. 2009-09-17 10:14:01 +00:00
Todd C. Miller
4421db631f Use get_timestr() and make the -l output look like the regular sudo log. 2009-09-17 09:56:04 +00:00
Todd C. Miller
3fe7ac2b95 Make get_timestr() take a time_t so we can use it properly in
sudoreplay.
2009-09-17 09:55:08 +00:00
Todd C. Miller
88a063b047 Create session dir earlier now that we update the seq number early. 2009-09-17 09:54:33 +00:00
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