Todd C. Miller [Thu, 13 Nov 2014 03:33:41 +0000 (20:33 -0700)]
In set_fqdn() we neeed to set user_runhost/user_srunhost at the
same time we set user_host/user_shost since that is what
hostlist_matches() uses. Bug #678
Todd C. Miller [Tue, 11 Nov 2014 22:29:19 +0000 (15:29 -0700)]
No need to keep specifying ".Nm foo" since the Nm macro remembers
the argument it was first called with and uses it if none is
specified. Also fix a few minor formatting errors and
regen bulleted lists in the .man.in files.
Todd C. Miller [Wed, 29 Oct 2014 19:03:39 +0000 (13:03 -0600)]
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.
Todd C. Miller [Wed, 29 Oct 2014 16:54:40 +0000 (10:54 -0600)]
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().
Todd C. Miller [Sun, 26 Oct 2014 14:33:08 +0000 (08:33 -0600)]
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.
Todd C. Miller [Fri, 24 Oct 2014 17:28:39 +0000 (11:28 -0600)]
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.
Todd C. Miller [Fri, 24 Oct 2014 17:17:48 +0000 (11:17 -0600)]
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.
Todd C. Miller [Thu, 23 Oct 2014 19:19:51 +0000 (13:19 -0600)]
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[].
Todd C. Miller [Thu, 23 Oct 2014 12:36:50 +0000 (06:36 -0600)]
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.
Todd C. Miller [Wed, 22 Oct 2014 19:23:05 +0000 (13:23 -0600)]
Add support for multiple Debug lines per program. Callers may
register arbitrary debug facilities or use built-in defaults. We
now use separate Debug statements for plugins and programs.
Todd C. Miller [Wed, 22 Oct 2014 19:20:32 +0000 (13:20 -0600)]
Change how sudo.conf is parsed. We now do a quick parse and then
set the values after the entire file has been parsed. This lets
us init the debug system earlier. Plugin-specific debug flags are
now stored in struct plugin_info and struct plugin_container and
passed to the plugin via one or more debug_flags settings.
Todd C. Miller [Wed, 22 Oct 2014 19:13:00 +0000 (13:13 -0600)]
Return settings from parse_args as struct sudo_settings and format
for the plugin at plugin open time. This will allow for additional,
plugin-specific settings to be added to the array.
Todd C. Miller [Mon, 13 Oct 2014 14:33:25 +0000 (08:33 -0600)]
Fix logic bug. We only want to return -1 from linux_audit_open()
when audit_open() fails and errno is not one of EINVAL, EPROTONOSUPPORT,
or EAFNOSUPPORT. For those errno values, we return AUDIT_NOT_CONFIGURED
which is not a fatal error. Bug #671
Todd C. Miller [Sun, 5 Oct 2014 22:41:52 +0000 (16:41 -0600)]
Add sudo_warn_set_conversation() to specify a conversation function
to use for warn/fatal. If no conversation function is specified,
the standard error will be used. We now only need sudo_printf()
for things that use the parser.
Todd C. Miller [Wed, 1 Oct 2014 21:42:07 +0000 (15:42 -0600)]
Fix detection of functions in network libs like -lsocket, -lnsl and
-linet when we have already added those libs to NET_LIBS.
Fixes a problem where inet_pton() was not detected on Solaris.
Todd C. Miller [Wed, 1 Oct 2014 20:32:30 +0000 (14:32 -0600)]
Instead of building libutil statically for --disable-shared-libutil,
just treat it as a convenience library. Do the same with sudoers
for --enable-static-sudoers. Fixes link errors on Solaris among
others when --disable-shared-libutil is used.