Commit Graph

1433 Commits

Author SHA1 Message Date
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
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
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
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
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
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
1890f0fcd6 Fix debugging printout output for env_should_keep() 2014-10-07 10:11:08 -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
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
c823eb3ef9 Add BASH_FUNC_* to environment blacklist for newer-style bash functions. 2014-09-27 19:52:45 -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
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
ae137ba557 Sync with translationproject.org 2014-09-17 10:12:12 -06:00
Todd C. Miller
09a876ceda Make sure we can't insert an nss entry in the list that has already
been used before.
2014-09-16 14:15:30 -06:00
Todd C. Miller
e7de8f66ff Use correct gettext macro with sudo_warnx() 2014-09-16 14:01:02 -06:00
Todd C. Miller
15dee8745d Make sudoers file nsswitch functions static to parse.c since they
are self-contained.
2014-09-15 15:11:30 -06:00
Todd C. Miller
f9ac177763 Fix infinite loop when mulitple sudoers entries are present in
nsswitch.conf.  From Daniel Kopecek.
2014-09-15 07:40:33 -06:00
Todd C. Miller
e20475922d There is no longer a reason for the plugin to init the debug subsystem
itself.  It will always be initialized by the front-end if needed.
2014-09-08 16:24:32 -06:00
Todd C. Miller
2cc8ac30a1 Add hexchar unit test 2014-09-03 10:31:47 -06:00
Todd C. Miller
b3586c46e2 Avoid division by zero if there was no test data. 2014-09-03 10:29:46 -06:00
Todd C. Miller
f6e738feeb Sync with translationproject.org 2014-09-01 12:47:22 -06:00
Todd C. Miller
191a0569f3 Sync with translationproject.org 2014-08-26 13:55:48 -06:00
Todd C. Miller
af9306cd81 Return -1 from logging functions if we get a write error. 2014-08-26 13:54:29 -06:00
Todd C. Miller
136e6e616f Add trivial dirty word check to the sample output logging function. 2014-08-26 12:04:25 -06:00
Todd C. Miller
fb82e823f4 Fix return value when kernel has no audit support. 2014-08-15 15:56:25 -06:00
Todd C. Miller
c49ca1d315 Don't allow pam_env to overwrite existing variables when env_reset
is disabled unless the variables match the black list and would
normally be removed.  It may just be better to never overwrite when
env_reset is disabled.
2014-08-11 10:37:08 -06:00
Todd C. Miller
2f472d5966 Update year range to include 2014 2014-08-09 20:46:21 -06:00
Todd C. Miller
69762d8882 Remove generated files for linker as part of distclean. 2014-08-08 14:49:06 -06:00
Todd C. Miller
696080917c Avoid building/running the check_symbols test program unless we are
building a shared sudoers plugin.
2014-08-08 11:19:20 -06:00
Todd C. Miller
dd43530f0a Remove two instances of -no-fast-install that were missed before. 2014-08-08 11:07:09 -06:00
Todd C. Miller
df0fd41530 Add explicit support for matching the full environment string
(name=value).  Bash functions may now be preserved for full matches,
but not for name-only matches.
2014-08-06 16:45:57 -06:00
Todd C. Miller
080d0e650f Regen .pot files 2014-07-30 09:37:47 -06:00
Todd C. Miller
f29880c1c7 If getaddrinfo() is missing libsudoutil may need to pull in networking
libraries.
2014-07-29 13:06:18 -06:00
Todd C. Miller
b0a09fb671 Add check for inet_ntoa() since it may live in libnsl.
Make getcwd() replacement private to the SunOS 4 section.
2014-07-28 16:11:39 -06:00
Todd C. Miller
014edc20a3 Avoid mixing declarations and code for non-C99 compilers. 2014-07-28 15:21:44 -06:00
Todd C. Miller
d058611bd6 Fix compilation on systems w/o netgroups. 2014-07-28 06:22:52 -06:00