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.
Todd C. Miller [Sat, 27 Sep 2014 16:16:31 +0000 (10:16 -0600)]
Block SIGINT and SIGQUIT while verifying passwords so that
authentication modules that use sleep() are not interrupted.
If the user interrupted authentication, exit the loop.
Todd C. Miller [Sat, 27 Sep 2014 16:13:28 +0000 (10:13 -0600)]
Only check for -lshadow if we haven't already found getspnam() in
libc. Rather than treat this specially, just add -lshadow as another
place to search in addition to -lgen.
Todd C. Miller [Wed, 24 Sep 2014 15:18:54 +0000 (09:18 -0600)]
In pp_files_expand() set _target to be empty. Fixes a problem with
Solaris sh where simply using typeset doesn't causes the variable
to be treated as local so we can inadvertantly inherit a value from
a previous call.
Todd C. Miller [Sat, 20 Sep 2014 15:21:51 +0000 (09:21 -0600)]
On AIX, _PATH_BSHELL is /usr/bin/bsh but we want to use /usr/bin/sh
(which is usually ksh). This makes sudo's behavior when executing
a shell without the #! magic number match execvp() on AIX.
Todd C. Miller [Sat, 20 Sep 2014 12:46:27 +0000 (06:46 -0600)]
Don't use SSP_CFLAGS or PIE_CFLAGS when building mksiglist/mksigname
as they are built with the host compiler which may be different
when cross-compiling. From Gustavo Zacarias. Bug 662.
Todd C. Miller [Mon, 8 Sep 2014 20:30:17 +0000 (14:30 -0600)]
Remove obsolete definition of SIZE_T which is now handled by
sudo_compat.h and rename the format arg to fmt in sudo_evasprintf_v1()
for consistency with sudo_easprintf_v1().
Todd C. Miller [Sat, 30 Aug 2014 22:24:53 +0000 (16:24 -0600)]
Remove signal_event from evbase before calling sudo_ev_loopexit()
when the command has exited or been killed. It is possible that
we could receive another signal on the pipe if they are delivered
out of order.
Todd C. Miller [Tue, 26 Aug 2014 18:07:57 +0000 (12:07 -0600)]
Change behavior when plugin I/O logging function returns 0 or -1.
For -1 (error) return, we now kill the command and disable
the I/O logging function that returned the error.
For a 0 (reject) return, we no longer display the rejected
output to the user's terminal. The plugin API revision is now 1.6.