Commit Graph

7718 Commits

Author SHA1 Message Date
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
Todd C. Miller
866cfc4fc3 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.
2014-10-22 13:23:05 -06:00
Todd C. Miller
a7e724b75d 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.
2014-10-22 13:20:32 -06:00
Todd C. Miller
346ff6766e Pass plugin path in the settings array. 2014-10-22 13:13:00 -06:00
Todd C. Miller
1e0b8903f2 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.
2014-10-22 13:13:00 -06:00
Todd C. Miller
f71d4abd7b Remove an unneeded NULL check to quiet a cppcheck warning. 2014-10-22 10:41:23 -06:00
Todd C. Miller
15f5af06d7 Set locale to C for visudo and testsudoers regression tests.
Bug #672
2014-10-14 08:54:23 -06:00
Todd C. Miller
38c7d7abc4 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
2014-10-13 08:33:25 -06:00
Todd C. Miller
2c5239a3a7 Add back fix for Bug #663 2014-10-11 16:45:07 -06:00
Todd C. Miller
8f1fb89d53 The older style bash function exporting is not used by post-shellshock
versions of bash.
2014-10-10 14:04:10 -06:00
Todd C. Miller
7a901d4c07 Apple uses a different variant of the BASH_FUNC prefix for bash
functions.
2014-10-10 13:55:36 -06:00
Todd C. Miller
0be86df4dd Remove change that is part of 1.8.12 not 1.8.11p1 2014-10-07 20:28:08 -06:00
Todd C. Miller
a50e72b81b Update for sudo 1.8.11p1 2014-10-07 14:14:43 -06:00
Todd C. Miller
837fb1f81d Only check stdin for the tty and avoid the check entirely if we
don't have a way to get the tty from the kernel.  Bug #643
2014-10-07 13:50:53 -06:00
Todd C. Miller
1dd96778e5 Make a copy of ap in sudo_debug_vprintf2() in case the static buffer
is not big enough and we need to call vasprintf().
2014-10-07 12:26:32 -06:00
Todd C. Miller
dc67442151 Avoid comparing new cwd with old one if getcwd() failed.
Bug #670
2014-10-07 10:56:50 -06:00
Todd C. Miller
1890f0fcd6 Fix debugging printout output for env_should_keep() 2014-10-07 10:11:08 -06:00
Todd C. Miller
d7574a344e Use INSTALL_OWNER instead of -O/-G flags so we can work with the
autotools install-sh too.  Bug #669
2014-10-06 14:23:41 -06:00
Todd C. Miller
79f4471e41 Move sudo_printf to policy.c to match sudo_conv. 2014-10-06 10:13:42 -06:00
Todd C. Miller
bd99dcc028 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.
2014-10-05 16:41:52 -06:00
Todd C. Miller
29be093646 Use correct names when referring to subsections in the sudoers manual. 2014-10-03 10:41:53 -06:00
Todd C. Miller
5f9e84ea51 Use inet_ntop() instead of inet_ntoa() and include a version for
systems that are missing it.
2014-10-02 07:55:08 -06:00
Todd C. Miller
1d7bab5046 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.
2014-10-01 15:42:07 -06:00
Todd C. Miller
1faf2b5958 Mention --disable-shared-libutil fix. 2014-10-01 15:09:44 -06:00
Todd C. Miller
2f3ebce118 Always use --tag=disable-static to avoid installing a static
sudo_noexec.
2014-10-01 14:39:20 -06:00
Todd C. Miller
0b0481fa36 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.
2014-10-01 14:32:30 -06:00
Todd C. Miller
05d3a4c5e5 Remove LT_LDMAP and LT_LDOPT and just use LT_LDEXPORTS for the
compiler-specific option to restrict symbol exporting.
2014-10-01 13:24:57 -06:00
Todd C. Miller
1d0b5422ae Include sys/types.h to get gid_t, etc used in sudo_compat.h.
Fixes a build issue on Solaris.
2014-10-01 09:30:17 -06:00
Todd C. Miller
b2e138bde0 Fix cust & pasto in error message when there is a mismatch between
the sudo and libc ttys.  From Diego Elio Petteno'.  Bug #643
2014-09-29 15:33:39 -06:00
Todd C. Miller
c823eb3ef9 Add BASH_FUNC_* to environment blacklist for newer-style bash functions. 2014-09-27 19:52:45 -06:00
Todd C. Miller
a62662fa3e Pull additional password prompts out of mkpkg instead of hard-coding
them.
2014-09-27 10:39:07 -06:00
Todd C. Miller
38df51ffe8 Add post-1.8.11 changes 2014-09-27 10:31:06 -06:00
Todd C. Miller
496c2e287b Add a space after "Password:" in default password prompt so it is
easier to read when pwfeedback is enabled.
2014-09-27 10:24:19 -06:00
Todd C. Miller
b7444e0f83 Simplify how we count the password tries 2014-09-27 10:17:21 -06:00
Todd C. Miller
355834c76a 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.
2014-09-27 10:16:31 -06:00
Todd C. Miller
0660d88b2b Remove Convex support; it is not modern enough to run sudo 1.8. 2014-09-27 10:16:26 -06:00
Todd C. Miller
27943df344 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.
2014-09-27 10:13:28 -06:00
Todd C. Miller
d28c525ede If all authentication methods fail init/setup, fail with an error. 2014-09-26 20:55:19 -06:00
Todd C. Miller
4105734743 Move pass_warn() so that it is defined before it is called(). 2014-09-26 20:39:40 -06:00
Todd C. Miller
b6432173cc Remove duplicate Requires: line in generated rpm spec file. 2014-09-24 14:02:04 -06:00
Todd C. Miller
d92df79747 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.
2014-09-24 09:18:54 -06:00