Simon Ruderich
5af5f0faa2
debug.h: Minor code style fix.
2013-06-06 20:13:04 +02:00
Simon Ruderich
7f9856c5da
Hook error() and error_at_line() if available.
...
They are used by some GNU programs to display error messages.
2013-06-05 23:57:05 +02:00
Simon Ruderich
b140cc0a82
coloredstderr.c: Use #include <config.h>.
...
This ensures that config.h from the build directory is preferred over a
possible file of the same name in the source directory.
2013-06-05 18:11:33 +02:00
Simon Ruderich
4d10935aee
check_handle_fd(): Reduce calls to isatty().
2013-06-05 03:33:08 +02:00
Simon Ruderich
feff94de6b
trackfds.h: Remove unnecessary strdup().
2013-06-05 03:16:59 +02:00
Simon Ruderich
7ea72c40db
Hook execve() and the other exec*() functions.
...
Prevents programs from removing our environment variables during the
exec.
Also reduces unnecessary calls to update_environment() by calling it
only once before the exec.
2013-06-05 01:40:56 +02:00
Simon Ruderich
a9db9083b6
Minor documentation updates.
2013-06-05 01:07:47 +02:00
Simon Ruderich
374b11a314
tests: Also run tests in subshell with LD_PRELOAD set.
2013-06-05 01:06:10 +02:00
Simon Ruderich
76742316e8
trackfds.h: Fix realloc() in update_environment().
2013-06-05 00:57:26 +02:00
Simon Ruderich
d475e5ec89
Improve debug output.
2013-06-05 00:53:55 +02:00
Simon Ruderich
df4c9eab97
trackfds.h: Fix invalid write if tracked_fds_count is 0.
...
Also fixes missing initialization of env array.
2013-06-04 03:34:19 +02:00
Simon Ruderich
b22a078b8d
configure.ac: Don't require special versions of malloc/realloc.
2013-06-03 22:35:51 +02:00
Simon Ruderich
dbafded223
configure.ac: Reorder macros to follow convention.
2013-06-03 22:18:16 +02:00
Simon Ruderich
7c5d6fce3a
Only hook vfork() if it's available.
2013-06-03 21:59:57 +02:00
Simon Ruderich
66fb589680
debug.h: Handle overflow in debug().
2013-06-03 04:32:12 +02:00
Simon Ruderich
686bf50bcd
trackfds.h: Handle overflow in update_environment().
2013-06-03 04:28:43 +02:00
Simon Ruderich
7108005fff
tests: Use <STDERR< and >STDERR> as markers.
...
Increases contrast to "stderr" output string.
2013-06-02 23:41:31 +02:00
Simon Ruderich
e091b977de
tests: Use bash to get consistent test results.
2013-06-02 23:39:14 +02:00
Simon Ruderich
e362a42f56
COPYING: Add, GPL 3.
2013-06-02 18:40:39 +02:00
Simon Ruderich
1c5441c26a
Hook vfork() and replace it with fork().
2013-06-02 18:25:49 +02:00
Simon Ruderich
66140e14e4
hookmacros.h: Be more careful to restore the errno.
...
check_handle_fd() or handle_fd_pre() might also modify it.
2013-06-01 22:47:23 +02:00
Simon Ruderich
73870d5ed5
hookmacros.h: Reduce duplication in HOOK_VOID1().
2013-06-01 22:44:22 +02:00
Simon Ruderich
ad50ad9c54
Hook perror(3).
2013-06-01 22:08:45 +02:00
Simon Ruderich
b34a8ce50b
configure.ac: Require libtool 2.4.
2013-06-01 21:55:10 +02:00
Simon Ruderich
fb9548453f
Add simple test suite.
2013-06-01 21:51:28 +02:00
Simon Ruderich
96710bc3fa
Add ENV_NAME_FORCE_WRITE to force writes to non-tty devices.
2013-06-01 21:13:23 +02:00
Simon Ruderich
7d4d8e0784
Fix initialization if ENV_NAME_FDS was not set.
...
If ENV_NAME_FDS is not set then init_from_environment() was called for
each hooked function, instead of just once.
2013-06-01 18:27:56 +02:00
Simon Ruderich
5e162a33ae
Fix signature of fcntl() hook.
2013-05-31 22:31:11 +02:00
Simon Ruderich
b9b86029be
Display PID in tracked_fds_debug().
2013-05-31 18:40:49 +02:00
Simon Ruderich
8772530a2e
trackfds.h: Add missing void to function definition.
2013-05-31 18:39:47 +02:00
Simon Ruderich
f369605227
fcntl(): Don't call dup_fd() if real_fcntl() failed.
2013-05-31 18:37:55 +02:00
Simon Ruderich
6d15f6c990
Rename macros.h to hookmacros.h.
2013-05-31 18:36:21 +02:00
Simon Ruderich
abc3d7889f
Initial commit.
2013-05-31 18:19:12 +02:00