]> granicus.if.org Git - sudo/log
sudo
10 years agoDon't call into the debug subsystem after we've deregistered the
Todd C. Miller [Thu, 23 Oct 2014 19:42:50 +0000 (13:42 -0600)]
Don't call into the debug subsystem after we've deregistered the
plugin's instance.

10 years agoOnly fill in subsystem_ids[] for the instance if the caller passed
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[].

10 years agoLink with -ldl if needed when built with --disable-shared-libutil/
Todd C. Miller [Thu, 23 Oct 2014 19:08:21 +0000 (13:08 -0600)]
Link with -ldl if needed when built with --disable-shared-libutil/

10 years agoFix includes order.
Todd C. Miller [Thu, 23 Oct 2014 16:16:13 +0000 (10:16 -0600)]
Fix includes order.

10 years agoRemove extra newline mistakenly introduced in rev 9682.
Todd C. Miller [Thu, 23 Oct 2014 16:15:38 +0000 (10:15 -0600)]
Remove extra newline mistakenly introduced in rev 9682.

10 years agoFix typo in unset.
Todd C. Miller [Thu, 23 Oct 2014 15:50:29 +0000 (09:50 -0600)]
Fix typo in unset.

10 years agoSet debug instance for standalone programs.
Todd C. Miller [Thu, 23 Oct 2014 15:40:36 +0000 (09:40 -0600)]
Set debug instance for standalone programs.

10 years agoFix compilation issues, fallout from the debug changes.
Todd C. Miller [Thu, 23 Oct 2014 15:26:13 +0000 (09:26 -0600)]
Fix compilation issues, fallout from the debug changes.

10 years agoregen
Todd C. Miller [Thu, 23 Oct 2014 13:57:37 +0000 (07:57 -0600)]
regen

10 years agoSudo 1.8.12
Todd C. Miller [Thu, 23 Oct 2014 13:29:08 +0000 (07:29 -0600)]
Sudo 1.8.12

10 years agoUpdate with debug system changes and revent bug fixes.
Todd C. Miller [Thu, 23 Oct 2014 13:28:36 +0000 (07:28 -0600)]
Update with debug system changes and revent bug fixes.

10 years agoWhen registering with the debug subsystem, the caller now passes
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.

10 years agosudoers_debug_instance is now included in libparsesudoers so we don't
Todd C. Miller [Thu, 23 Oct 2014 12:19:30 +0000 (06:19 -0600)]
sudoers_debug_instance is now included in libparsesudoers so we don't
need to declare it here.

10 years agoThe sudoers plugin now defines its own list of debugging subsystem names
Todd C. Miller [Wed, 22 Oct 2014 19:30:52 +0000 (13:30 -0600)]
The sudoers plugin now defines its own list of debugging subsystem names
and defines.

10 years agoAdd support for multiple Debug lines per program. Callers may
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.

10 years agoChange how sudo.conf is parsed. We now do a quick parse and then
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.

10 years agoPass plugin path in the settings array.
Todd C. Miller [Wed, 22 Oct 2014 19:13:00 +0000 (13:13 -0600)]
Pass plugin path in the settings array.

10 years agoReturn settings from parse_args as struct sudo_settings and format
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.

10 years agoRemove an unneeded NULL check to quiet a cppcheck warning.
Todd C. Miller [Wed, 22 Oct 2014 16:41:23 +0000 (10:41 -0600)]
Remove an unneeded NULL check to quiet a cppcheck warning.

10 years agoSet locale to C for visudo and testsudoers regression tests.
Todd C. Miller [Tue, 14 Oct 2014 14:54:23 +0000 (08:54 -0600)]
Set locale to C for visudo and testsudoers regression tests.
Bug #672

10 years agoFix logic bug. We only want to return -1 from linux_audit_open()
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

10 years agoAdd back fix for Bug #663
Todd C. Miller [Sat, 11 Oct 2014 22:45:07 +0000 (16:45 -0600)]
Add back fix for Bug #663

10 years agoThe older style bash function exporting is not used by post-shellshock
Todd C. Miller [Fri, 10 Oct 2014 20:04:10 +0000 (14:04 -0600)]
The older style bash function exporting is not used by post-shellshock
versions of bash.

10 years agoApple uses a different variant of the BASH_FUNC prefix for bash
Todd C. Miller [Fri, 10 Oct 2014 19:55:36 +0000 (13:55 -0600)]
Apple uses a different variant of the BASH_FUNC prefix for bash
functions.

10 years agoRemove change that is part of 1.8.12 not 1.8.11p1
Todd C. Miller [Wed, 8 Oct 2014 02:28:08 +0000 (20:28 -0600)]
Remove change that is part of 1.8.12 not 1.8.11p1

10 years agoUpdate for sudo 1.8.11p1
Todd C. Miller [Tue, 7 Oct 2014 20:14:43 +0000 (14:14 -0600)]
Update for sudo 1.8.11p1

10 years agoOnly check stdin for the tty and avoid the check entirely if we
Todd C. Miller [Tue, 7 Oct 2014 19:50:53 +0000 (13:50 -0600)]
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

10 years agoMake a copy of ap in sudo_debug_vprintf2() in case the static buffer
Todd C. Miller [Tue, 7 Oct 2014 18:26:32 +0000 (12:26 -0600)]
Make a copy of ap in sudo_debug_vprintf2() in case the static buffer
is not big enough and we need to call vasprintf().

10 years agoAvoid comparing new cwd with old one if getcwd() failed.
Todd C. Miller [Tue, 7 Oct 2014 16:56:50 +0000 (10:56 -0600)]
Avoid comparing new cwd with old one if getcwd() failed.
Bug #670

10 years agoFix debugging printout output for env_should_keep()
Todd C. Miller [Tue, 7 Oct 2014 16:11:08 +0000 (10:11 -0600)]
Fix debugging printout output for env_should_keep()

10 years agoUse INSTALL_OWNER instead of -O/-G flags so we can work with the
Todd C. Miller [Mon, 6 Oct 2014 20:23:41 +0000 (14:23 -0600)]
Use INSTALL_OWNER instead of -O/-G flags so we can work with the
autotools install-sh too.  Bug #669

10 years agoMove sudo_printf to policy.c to match sudo_conv.
Todd C. Miller [Mon, 6 Oct 2014 16:13:42 +0000 (10:13 -0600)]
Move sudo_printf to policy.c to match sudo_conv.

10 years agoAdd sudo_warn_set_conversation() to specify a conversation function
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.

10 years agoUse correct names when referring to subsections in the sudoers manual.
Todd C. Miller [Fri, 3 Oct 2014 16:41:53 +0000 (10:41 -0600)]
Use correct names when referring to subsections in the sudoers manual.

10 years agoUse inet_ntop() instead of inet_ntoa() and include a version for
Todd C. Miller [Thu, 2 Oct 2014 13:55:08 +0000 (07:55 -0600)]
Use inet_ntop() instead of inet_ntoa() and include a version for
systems that are missing it.

10 years agoFix detection of functions in network libs like -lsocket, -lnsl and
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.

10 years agoMention --disable-shared-libutil fix.
Todd C. Miller [Wed, 1 Oct 2014 21:09:44 +0000 (15:09 -0600)]
Mention --disable-shared-libutil fix.

10 years agoAlways use --tag=disable-static to avoid installing a static
Todd C. Miller [Wed, 1 Oct 2014 20:39:20 +0000 (14:39 -0600)]
Always use --tag=disable-static to avoid installing a static
sudo_noexec.

10 years agoInstead of building libutil statically for --disable-shared-libutil,
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.

10 years agoRemove LT_LDMAP and LT_LDOPT and just use LT_LDEXPORTS for the
Todd C. Miller [Wed, 1 Oct 2014 19:24:57 +0000 (13:24 -0600)]
Remove LT_LDMAP and LT_LDOPT and just use LT_LDEXPORTS for the
compiler-specific option to restrict symbol exporting.

10 years agoInclude sys/types.h to get gid_t, etc used in sudo_compat.h.
Todd C. Miller [Wed, 1 Oct 2014 15:30:17 +0000 (09:30 -0600)]
Include sys/types.h to get gid_t, etc used in sudo_compat.h.
Fixes a build issue on Solaris.

10 years agoFix cust & pasto in error message when there is a mismatch between
Todd C. Miller [Mon, 29 Sep 2014 21:33:39 +0000 (15:33 -0600)]
Fix cust & pasto in error message when there is a mismatch between
the sudo and libc ttys.  From Diego Elio Petteno'.  Bug #643

10 years agoAdd BASH_FUNC_* to environment blacklist for newer-style bash functions.
Todd C. Miller [Sun, 28 Sep 2014 01:52:45 +0000 (19:52 -0600)]
Add BASH_FUNC_* to environment blacklist for newer-style bash functions.

10 years agoPull additional password prompts out of mkpkg instead of hard-coding
Todd C. Miller [Sat, 27 Sep 2014 16:39:07 +0000 (10:39 -0600)]
Pull additional password prompts out of mkpkg instead of hard-coding
them.

10 years agoAdd post-1.8.11 changes
Todd C. Miller [Sat, 27 Sep 2014 16:31:06 +0000 (10:31 -0600)]
Add post-1.8.11 changes

10 years agoAdd a space after "Password:" in default password prompt so it is
Todd C. Miller [Sat, 27 Sep 2014 16:24:19 +0000 (10:24 -0600)]
Add a space after "Password:" in default password prompt so it is
easier to read when pwfeedback is enabled.

10 years agoSimplify how we count the password tries
Todd C. Miller [Sat, 27 Sep 2014 16:17:21 +0000 (10:17 -0600)]
Simplify how we count the password tries

10 years agoBlock SIGINT and SIGQUIT while verifying passwords so that
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.

10 years agoRemove Convex support; it is not modern enough to run sudo 1.8.
Todd C. Miller [Sat, 27 Sep 2014 16:16:26 +0000 (10:16 -0600)]
Remove Convex support; it is not modern enough to run sudo 1.8.

10 years agoOnly check for -lshadow if we haven't already found getspnam() in
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.

10 years agoIf all authentication methods fail init/setup, fail with an error.
Todd C. Miller [Sat, 27 Sep 2014 02:55:19 +0000 (20:55 -0600)]
If all authentication methods fail init/setup, fail with an error.

10 years agoMove pass_warn() so that it is defined before it is called().
Todd C. Miller [Sat, 27 Sep 2014 02:39:40 +0000 (20:39 -0600)]
Move pass_warn() so that it is defined before it is called().

10 years agoRemove duplicate Requires: line in generated rpm spec file.
Todd C. Miller [Wed, 24 Sep 2014 20:02:04 +0000 (14:02 -0600)]
Remove duplicate Requires: line in generated rpm spec file.

10 years agoIn pp_files_expand() set _target to be empty. Fixes a problem with
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.

10 years agoFix version for release.
Todd C. Miller [Tue, 23 Sep 2014 17:00:32 +0000 (11:00 -0600)]
Fix version for release.

10 years agoOnly redefine _PATH_BSHELL on AIX if we included paths.h.
Todd C. Miller [Sat, 20 Sep 2014 16:16:46 +0000 (10:16 -0600)]
Only redefine _PATH_BSHELL on AIX if we included paths.h.

10 years agoBug 661
Todd C. Miller [Sat, 20 Sep 2014 15:35:51 +0000 (09:35 -0600)]
Bug 661

10 years agoOn AIX, _PATH_BSHELL is /usr/bin/bsh but we want to use /usr/bin/sh
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.

10 years agoWhitespace changes.
Todd C. Miller [Sat, 20 Sep 2014 15:09:01 +0000 (09:09 -0600)]
Whitespace changes.

10 years agoPrefer /usr/bin/sh to /bin/sh to match modern systems.
Todd C. Miller [Sat, 20 Sep 2014 15:03:26 +0000 (09:03 -0600)]
Prefer /usr/bin/sh to /bin/sh to match modern systems.

10 years agoDon't use SSP_CFLAGS or PIE_CFLAGS when building mksiglist/mksigname
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.

10 years agoSync with translationproject.org
Todd C. Miller [Wed, 17 Sep 2014 16:12:12 +0000 (10:12 -0600)]
Sync with translationproject.org

10 years agoMake sure we can't insert an nss entry in the list that has already
Todd C. Miller [Tue, 16 Sep 2014 20:15:30 +0000 (14:15 -0600)]
Make sure we can't insert an nss entry in the list that has already
been used before.

10 years agoUse correct gettext macro with sudo_warnx()
Todd C. Miller [Tue, 16 Sep 2014 20:01:02 +0000 (14:01 -0600)]
Use correct gettext macro with sudo_warnx()

10 years agoMake nsswitch.conf bug fix description more accurrate. It affects
Todd C. Miller [Tue, 16 Sep 2014 19:38:38 +0000 (13:38 -0600)]
Make nsswitch.conf bug fix description more accurrate.  It affects
the "files" nsswitch source too.

10 years agoMention nsswitch.conf duplicate entry fix.
Todd C. Miller [Tue, 16 Sep 2014 18:54:13 +0000 (12:54 -0600)]
Mention nsswitch.conf duplicate entry fix.

10 years agoMake sudoers file nsswitch functions static to parse.c since they
Todd C. Miller [Mon, 15 Sep 2014 21:11:30 +0000 (15:11 -0600)]
Make sudoers file nsswitch functions static to parse.c since they
are self-contained.

10 years agoFix infinite loop when mulitple sudoers entries are present in
Todd C. Miller [Mon, 15 Sep 2014 13:40:33 +0000 (07:40 -0600)]
Fix infinite loop when mulitple sudoers entries are present in
nsswitch.conf.  From Daniel Kopecek.

10 years agoFix for bug #660
Todd C. Miller [Wed, 10 Sep 2014 12:01:29 +0000 (06:01 -0600)]
Fix for bug #660

10 years agoFix compilation on systems without openpty(), _getpty() or grantpt().
Todd C. Miller [Wed, 10 Sep 2014 11:57:31 +0000 (05:57 -0600)]
Fix compilation on systems without openpty(), _getpty() or grantpt().
From Vasilyy Balyasnyy

10 years agoRemove remaining use of SUDO_CONV_DEBUG_MSG.
Todd C. Miller [Mon, 8 Sep 2014 22:37:33 +0000 (16:37 -0600)]
Remove remaining use of SUDO_CONV_DEBUG_MSG.

10 years agoSUDO_CONV_DEBUG_MSG is no longer supported.
Todd C. Miller [Mon, 8 Sep 2014 22:34:47 +0000 (16:34 -0600)]
SUDO_CONV_DEBUG_MSG is no longer supported.

10 years agoregen
Todd C. Miller [Mon, 8 Sep 2014 22:33:58 +0000 (16:33 -0600)]
regen

10 years agoThere is no longer a reason for the plugin to init the debug subsystem
Todd C. Miller [Mon, 8 Sep 2014 22:24:32 +0000 (16:24 -0600)]
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.

10 years agoAdd function arg names to prototypes where missing.
Todd C. Miller [Mon, 8 Sep 2014 20:43:01 +0000 (14:43 -0600)]
Add function arg names to prototypes where missing.

10 years agoRemove obsolete definition of SIZE_T which is now handled by
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().

10 years agoIf we were invoked with any name ending in "edit", treat as sudoedit.
Todd C. Miller [Mon, 8 Sep 2014 15:37:39 +0000 (09:37 -0600)]
If we were invoked with any name ending in "edit", treat as sudoedit.

10 years agoregen
Todd C. Miller [Thu, 4 Sep 2014 16:15:32 +0000 (10:15 -0600)]
regen

10 years agoCheck return value of sigaction(), even though it should never fail.
Todd C. Miller [Thu, 4 Sep 2014 16:13:26 +0000 (10:13 -0600)]
Check return value of sigaction(), even though it should never fail.

10 years agoregen
Todd C. Miller [Wed, 3 Sep 2014 16:32:02 +0000 (10:32 -0600)]
regen

10 years agoAdd hexchar unit test
Todd C. Miller [Wed, 3 Sep 2014 16:31:47 +0000 (10:31 -0600)]
Add hexchar unit test

10 years agoAvoid division by zero if there was no test data.
Todd C. Miller [Wed, 3 Sep 2014 16:29:46 +0000 (10:29 -0600)]
Avoid division by zero if there was no test data.

10 years agoRemove confusing comment.
Todd C. Miller [Tue, 2 Sep 2014 21:00:23 +0000 (15:00 -0600)]
Remove confusing comment.

10 years agoUse a stack buffer for the debug message when possible, most are small.
Todd C. Miller [Tue, 2 Sep 2014 20:36:05 +0000 (14:36 -0600)]
Use a stack buffer for the debug message when possible, most are small.

10 years agoSync with translationproject.org
Todd C. Miller [Mon, 1 Sep 2014 18:47:22 +0000 (12:47 -0600)]
Sync with translationproject.org

10 years agoConvert a debug printf to a user-visible warning.
Todd C. Miller [Mon, 1 Sep 2014 02:32:18 +0000 (20:32 -0600)]
Convert a debug printf to a user-visible warning.

10 years agoMove sudo_printf extern to sudo_util.h
Todd C. Miller [Mon, 1 Sep 2014 00:46:26 +0000 (18:46 -0600)]
Move sudo_printf extern to sudo_util.h

10 years agoSome versions of the HP C Compiler don't export functions that take
Todd C. Miller [Mon, 1 Sep 2014 00:33:30 +0000 (18:33 -0600)]
Some versions of the HP C Compiler don't export functions that take
function pointers as arguments unless a typedef is used.

10 years agoWork around a bug in the HP C compiler.
Todd C. Miller [Sun, 31 Aug 2014 21:21:48 +0000 (15:21 -0600)]
Work around a bug in the HP C compiler.

10 years agoDon't need sudo_fatal.h
Todd C. Miller [Sun, 31 Aug 2014 20:20:44 +0000 (14:20 -0600)]
Don't need sudo_fatal.h

10 years agoSync with translationproject.org
Todd C. Miller [Sat, 30 Aug 2014 22:28:08 +0000 (16:28 -0600)]
Sync with translationproject.org

10 years agoRemove signal_event from evbase before calling sudo_ev_loopexit()
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.

10 years agoTreat EOF on signal pipe (which should never happen) as ECONNRESET.
Todd C. Miller [Fri, 29 Aug 2014 17:20:17 +0000 (11:20 -0600)]
Treat EOF on signal pipe (which should never happen) as ECONNRESET.

10 years agoDon't allow sudo_ev_loopcont() to override sudo_ev_loopexit()
Todd C. Miller [Fri, 29 Aug 2014 15:47:08 +0000 (09:47 -0600)]
Don't allow sudo_ev_loopcont() to override sudo_ev_loopexit()

10 years agoAdd some internal convenience functions.
Todd C. Miller [Fri, 29 Aug 2014 15:44:08 +0000 (09:44 -0600)]
Add some internal convenience functions.

10 years agoFix osrelease sed expression. It wasn't matching distros with a
Todd C. Miller [Tue, 26 Aug 2014 21:47:48 +0000 (15:47 -0600)]
Fix osrelease sed expression.  It wasn't matching distros with a
single digit version such as sles9.

10 years agoSync with translationproject.org
Todd C. Miller [Tue, 26 Aug 2014 19:55:48 +0000 (13:55 -0600)]
Sync with translationproject.org

10 years agoReturn -1 from logging functions if we get a write error.
Todd C. Miller [Tue, 26 Aug 2014 19:54:29 +0000 (13:54 -0600)]
Return -1 from logging functions if we get a write error.

10 years agoMention I/O plugin changes.
Todd C. Miller [Tue, 26 Aug 2014 19:41:32 +0000 (13:41 -0600)]
Mention I/O plugin changes.

10 years agoChange behavior when plugin I/O logging function returns 0 or -1.
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.