Commit Graph

7658 Commits

Author SHA1 Message Date
Todd C. Miller
2040d4dde5 Use arc4random() for mkstemp/mkdtemp if available. If not, try to
seed from /dev/urandom before falling back to the gettimeofday seed.
2014-10-31 06:57:19 -06:00
Todd C. Miller
ccc210eddb If a system lacks mkdtemp() or mkstemps(), use our own mkdtemp()
and mkstemps().  Previously we only exposed the missing one but
since the guts are the same we might as well use them.
2014-10-29 13:03:39 -06:00
Todd C. Miller
2eed956396 Use a static buffer for sudo_debug_execve2() if possible. 2014-10-31 06:57:17 -06:00
Todd C. Miller
55098ff6ec Mark the putenv(), setenv() and unsetenv() symbols as global, not
hidden.  Fixes a mismatch where a plugin (or its loaded dso) would
call setenv() to set a variables but be unable to find it later
with getenv().
2014-10-29 10:54:40 -06:00
Todd C. Miller
bbf3c08320 Fix install-nls target from builddir. 2014-10-28 14:45:39 -06:00
Todd C. Miller
53d4a02a45 Fix dependency on sudo.pp, it needs to relative to srcdir. 2014-10-28 14:14:22 -06:00
Todd C. Miller
ef6dfb3ced Adapt to new debug subsystem registration. 2014-10-28 07:36:08 -06:00
Todd C. Miller
67c7c7f9dd Add missing zlib.exp file and common LT_LDFLAGS Makefile.in. 2014-10-27 21:09:02 -06:00
Todd C. Miller
1be81d5720 Fix path settings broken in rev 9731. 2014-10-27 16:31:33 -06:00
Todd C. Miller
f730b28ce0 Adjust regress test now that boolean settings display an error for
invalid input.
2014-10-27 16:31:01 -06:00
Todd C. Miller
9d6e1a57d5 Add sudoers_debug_deregister() and use it instead of calling
sudo_debug_deregister() directly.
2014-10-27 16:06:20 -06:00
Todd C. Miller
0982f7838b Use AC_PROG_AWK 2014-10-27 14:54:13 -06:00
Todd C. Miller
640c9d7ec7 Mention shared zlib. 2014-10-27 14:49:28 -06:00
Todd C. Miller
2be376aae0 Add lib/zlib/zlib.exp 2014-10-27 14:47:48 -06:00
Todd C. Miller
9a9e865375 Add support for installing a shared zlib 2014-10-27 14:39:07 -06:00
Todd C. Miller
0d6895cbd9 fix comment typo 2014-10-27 14:21:27 -06:00
Todd C. Miller
7c295e40d4 Newer zlib uses HAVE_HIDDEN to turn on symbol hiding so we don't
need to disable it with NO_VIS.
2014-10-27 14:20:33 -06:00
Todd C. Miller
11feb6bfa5 regen 2014-10-27 12:35:49 -06:00
Todd C. Miller
adfdad9ae0 Version the symbols for sudo_debug.c now that the API is stable. 2014-10-27 05:26:08 -06:00
Todd C. Miller
d5fdd1ea07 Go back to parsing sudo.conf in place for settings and paths and
improve debugging info for unsupported entries and parse errors.
2014-10-26 08:33:09 -06:00
Todd C. Miller
6b1b734ffa Add a flag argument to sudo_conf_read() so we can decide which
bits get parsed.  This lets us parse Debug statements first and
init the debug subsystem early.
2014-10-26 08:33:08 -06:00
Todd C. Miller
f8bd2af4da Include stdio.h after zlib.h, not before. We need the large file defines
to come first.
2014-10-24 16:59:48 -06:00
Todd C. Miller
c783f01ada Update zlib to version 1.2.8 2014-10-24 15:28:03 -06:00
Todd C. Miller
d5a2d0f2d4 Don't add -Wold-style-definition to CFLAGS as it causes problems
with 3rd party libraries such as zlib.
2014-10-24 15:26:21 -06:00
Todd C. Miller
4c8573ac2b Free up plugin info structs after converting to plugin containers. 2014-10-24 15:09:35 -06:00
Todd C. Miller
b91a91d289 Move sample.* files to a sudo examples dir 2014-10-24 14:25:12 -06:00
Todd C. Miller
6e8b84fda2 Fix a packaging problem with the sudoedit man page link on Debian. 2014-10-24 14:25:10 -06:00
Todd C. Miller
34d9cfe1cf Initialize the debug subsystem in sudoers early. Currently this
means iterating over the settings list twice.
2014-10-24 12:50:12 -06:00
Todd C. Miller
fd8cf2c89b No need to convert sudoedit -> sudo in sudo_debug_get_instance()
as we store the actual program name and only do the sudoedit ->
sudo conversion when reading the sudo.conf file.  Fixes debugging
when invoked as sudoedit.
2014-10-24 11:28:39 -06:00
Todd C. Miller
4bf641df69 In the plugin registers with the debug framework at open time, the
sudo front-end will now set the default debug instance appropriately
before calling into the plugin.  This means the plugin no longer needs
to do the sudo_debug_set_default_instance() dance.
2014-10-24 11:17:48 -06:00
Todd C. Miller
a2e9d66be1 Remove duplicate -U__NBBY in CPPCHECK_OPTS 2014-10-24 09:40:07 -06:00
Todd C. Miller
6c6f502835 Older shells don't support unset. 2014-10-23 16:23:37 -06:00
Todd C. Miller
d0cc4d9e4b Fix inet_ntop() replacement on older systems without it.
We only expose the prototype for net_ifs.c due to the
use of socklen_t.
2014-10-23 15:44:03 -06:00
Todd C. Miller
7dc2c8fa1c Dynamically allocate debug_fds bitmap and realloc as needed. 2014-10-23 14:37:29 -06:00
Todd C. Miller
17a2a27e46 Use generic bitmap macros instead of select-style fd_set. 2014-10-23 14:37:27 -06:00
Todd C. Miller
4baa7e6d2c Replace sudo_debug_num_instances with sudo_debug_max_instance 2014-10-23 13:43:17 -06:00
Todd C. Miller
935e48c6e4 Don't call into the debug subsystem after we've deregistered the
plugin's instance.
2014-10-23 13:42:50 -06:00
Todd C. Miller
2a47abad21 Only fill in subsystem_ids[] for the instance if the caller passed
in an array for it.  If the caller only wants the default subsystems
we don't actually need ids[].
2014-10-23 13:19:51 -06:00
Todd C. Miller
f2eb6dcc06 Link with -ldl if needed when built with --disable-shared-libutil/ 2014-10-23 13:08:21 -06:00
Todd C. Miller
119c13d8b3 Fix includes order. 2014-10-23 10:16:13 -06:00
Todd C. Miller
2968ce060d Remove extra newline mistakenly introduced in rev 9682. 2014-10-23 10:15:38 -06:00
Todd C. Miller
3860552713 Fix typo in unset. 2014-10-23 09:50:29 -06:00
Todd C. Miller
fe9e035ccf Set debug instance for standalone programs. 2014-10-23 09:40:36 -06:00
Todd C. Miller
1ca52382a4 Fix compilation issues, fallout from the debug changes. 2014-10-23 09:26:13 -06:00
Todd C. Miller
6d2be1fd62 regen 2014-10-23 07:57:37 -06:00
Todd C. Miller
fbc54368cc Sudo 1.8.12 2014-10-23 07:29:08 -06:00
Todd C. Miller
323b4a814e Update with debug system changes and revent bug fixes. 2014-10-23 07:28:36 -06:00
Todd C. Miller
5270ebf1f2 When registering with the debug subsystem, the caller now passes
in an arrary of ints that gets filled in with the subsytem IDs to
be used in debug_decl.
2014-10-23 06:36:50 -06:00
Todd C. Miller
8db5f29398 sudoers_debug_instance is now included in libparsesudoers so we don't
need to declare it here.
2014-10-23 06:19:30 -06:00
Todd C. Miller
e9914a91b1 The sudoers plugin now defines its own list of debugging subsystem names
and defines.
2014-10-22 13:30:52 -06:00