]> granicus.if.org Git - sudo/log
sudo
8 years agoIgnore ts_write() return value when disabling an entry with a bogus
Todd C. Miller [Thu, 5 May 2016 22:30:11 +0000 (16:30 -0600)]
Ignore ts_write() return value when disabling an entry with a bogus
timestamp.  We ignore the timestamp entry even it doesn't succeed.
Coverity CID 104062.

8 years agoCast the return value of fcntl() to void when setting FD_CLOEXEC.
Todd C. Miller [Thu, 5 May 2016 22:16:24 +0000 (16:16 -0600)]
Cast the return value of fcntl() to void when setting FD_CLOEXEC.
Coverity CID 104063, 104064, 104069, 104070, 104071, 104072, 104073, 104074

8 years agoCast the return value of fcntl() to void when setting FD_CLOEXEC.
Todd C. Miller [Thu, 5 May 2016 22:09:51 +0000 (16:09 -0600)]
Cast the return value of fcntl() to void when setting FD_CLOEXEC.
Coverity CID 104075, 104076, 104077.

8 years agoAvoid a false positive. Coverity CID 104056.
Todd C. Miller [Thu, 5 May 2016 21:54:06 +0000 (15:54 -0600)]
Avoid a false positive.  Coverity CID 104056.

8 years agoAvoid calling fclose(NULL) on error in export_sudoers().
Todd C. Miller [Thu, 5 May 2016 21:14:57 +0000 (15:14 -0600)]
Avoid calling fclose(NULL) on error in export_sudoers().
Coverity CID 104091.

8 years agoIn fill_args(), check for "arg_size == 0" instead of
Todd C. Miller [Thu, 5 May 2016 21:12:37 +0000 (15:12 -0600)]
In fill_args(), check for "arg_size == 0" instead of
"sudoerslval.command.args == NULL" since the latter leads Coverity
to imply that sudoerslval.command.args could be NULL later on.
Coverity CID 104093.

8 years agoAvoid calling fclose(NULL) if the sudoers file is not secure and
Todd C. Miller [Thu, 5 May 2016 21:01:22 +0000 (15:01 -0600)]
Avoid calling fclose(NULL) if the sudoers file is not secure and
restore_perms() fails.  Coverity CID 104090.

8 years agoIn fill_args(), replace loop that increments arg_size() with
Todd C. Miller [Wed, 4 May 2016 22:59:04 +0000 (16:59 -0600)]
In fill_args(), replace loop that increments arg_size() with
a simple add and mask.  Should prevent a false positive from
Coverity CID 104094.

8 years agoIn parse_expr(), move the "bad" label after the "default" case in
Todd C. Miller [Wed, 4 May 2016 22:48:02 +0000 (16:48 -0600)]
In parse_expr(), move the "bad" label after the "default" case in
the switch(), not before it.  This seemed to confuse Covertity,
resulting in a false positive, CID 104095.

8 years agoFor "sudoreplay -l", not all predicates may be shortened to a single
Todd C. Miller [Wed, 4 May 2016 22:44:52 +0000 (16:44 -0600)]
For "sudoreplay -l", not all predicates may be shortened to a single
character.  Both 'c' and 't' have more than one possibility.

8 years agopid_t is defined by POSIX as a signed integer type so we don't need
Todd C. Miller [Wed, 4 May 2016 20:14:38 +0000 (14:14 -0600)]
pid_t is defined by POSIX as a signed integer type so we don't need
a cast when comparing to -1.

8 years agoIn dispatch_signal() for stopped processes check for tcgetpgrp()
Todd C. Miller [Wed, 4 May 2016 20:13:44 +0000 (14:13 -0600)]
In dispatch_signal() for stopped processes check for tcgetpgrp()
returning -1.  Also change checks from "saved_pgrp != -1" to
"fd != -1".  Coverity CID 104098.

8 years agoIn relabel_tty() always jump to bad: on error, regardless of the
Todd C. Miller [Wed, 4 May 2016 19:48:44 +0000 (13:48 -0600)]
In relabel_tty() always jump to bad: on error, regardless of the
value of se_state.enforcing.  On error, return -1 if enforcing,
else 0.  Coverity CID 104099.

8 years agoDefine NO_LEAKS when sudo is built with Coverity.
Todd C. Miller [Wed, 4 May 2016 19:01:57 +0000 (13:01 -0600)]
Define NO_LEAKS when sudo is built with Coverity.

8 years agoIn io_callback() if we write the complete buffer and find that there
Todd C. Miller [Wed, 4 May 2016 18:53:20 +0000 (12:53 -0600)]
In io_callback() if we write the complete buffer and find that there
is no associated reader just return as there is nothing else to be
done.  In practice is it not possible for SUDO_EV_READ to be set
if revent is NULL but an early return is harmless and possibly
easier to understand.  Coverity CID 104124.

8 years agoHandle read() returning -1 when creating temporary files.
Todd C. Miller [Wed, 4 May 2016 18:48:17 +0000 (12:48 -0600)]
Handle read() returning -1 when creating temporary files.
Coverity CID 104100

8 years agoFix cut and paste error when checking cols for 0.
Todd C. Miller [Wed, 4 May 2016 17:15:20 +0000 (11:15 -0600)]
Fix cut and paste error when checking cols for 0.
Coverity CID 104081

8 years agoUse a single debug message for cache hit or store to avoid another
Todd C. Miller [Wed, 4 May 2016 15:15:12 +0000 (09:15 -0600)]
Use a single debug message for cache hit or store to avoid another
situation where they get out of sync.  Bug #743

8 years agoSync the "cache hit" debug messages with the "cached" debug messages.
Todd C. Miller [Wed, 4 May 2016 14:55:21 +0000 (08:55 -0600)]
Sync the "cache hit" debug messages with the "cached" debug messages.
This fixes a bug where we could dereference a NULL pointer when we
look up a negative cached entry which is stored as a NULL passwd
or group struct pointer.  Bug #743.

8 years agoRemove the check for __sprintf_chk when checking for _FORTIFY_SOURCE,
Todd C. Miller [Thu, 28 Apr 2016 21:27:53 +0000 (15:27 -0600)]
Remove the check for __sprintf_chk when checking for _FORTIFY_SOURCE,
Some implementations are purely header-file based.  As long as we
can link a test program using sprintf() when _FORTIFY_SOURCE=2 it
should be safe to use.

8 years agoRemove configure checks for dev_t, id_t, ino_t, ptrdiff_t, size_t
Todd C. Miller [Thu, 28 Apr 2016 21:09:46 +0000 (15:09 -0600)]
Remove configure checks for dev_t, id_t, ino_t, ptrdiff_t, size_t
and ssize_t.  These have been specified by either ANSI C or POSIX
for long enough that if the system doesn't support them, it is
unlikely to be able to compile sudo anyway.

8 years agoDo group setup in policy_init_session() before calling out to the
Todd C. Miller [Thu, 28 Apr 2016 17:01:58 +0000 (11:01 -0600)]
Do group setup in policy_init_session() before calling out to the
plugin.  This makes it possible for the pam_group module to change
the group in pam_setcred().  It's a bit bogus since pam_setcred()
is documented as not changing the group or user ID, but pam_group
is shipped with stock Linux-PAM so we need to support it.

8 years agoAdd missing newline when logging to a file (not syslog) and
Todd C. Miller [Tue, 26 Apr 2016 20:39:42 +0000 (14:39 -0600)]
Add missing newline when logging to a file (not syslog) and
loglinelen is set to a non-positive number.  Bug #742

8 years agostyle fix; fork_cmnd should start on a new line
Todd C. Miller [Mon, 25 Apr 2016 15:58:32 +0000 (09:58 -0600)]
style fix; fork_cmnd should start on a new line

8 years agoIgnore SIGPIPE for the duration of sudo and not just in a few select
Todd C. Miller [Fri, 22 Apr 2016 22:36:36 +0000 (16:36 -0600)]
Ignore SIGPIPE for the duration of sudo and not just in a few select
places.  We have no control over what nss, PAM modules or sudo
plugins might do so ignoring SIGPIPE is safest.

8 years agoUse string_to_security_class() instead of pulling SECCLASS_CHR_FILE
Todd C. Miller [Fri, 22 Apr 2016 17:36:08 +0000 (11:36 -0600)]
Use string_to_security_class() instead of pulling SECCLASS_CHR_FILE
from flask.h.  Avoids a warning with new SELinux includes.

8 years agoWhen determining whether or not "sudo -l" or "sudo -b" should prompt
Todd C. Miller [Tue, 19 Apr 2016 16:08:51 +0000 (10:08 -0600)]
When determining whether or not "sudo -l" or "sudo -b" should prompt
for a password, take all sudoers sources into account.  In other
words, if both file and ldap sudoers sources are in use, "sudo -v"
will now require that all entries in both sources be have NOPASSWD
(file) or !authenticate (ldap) in the entries.

8 years agoIf the auth_type setting in /etc/security/login.cfg is set to
Todd C. Miller [Tue, 22 Mar 2016 22:31:28 +0000 (16:31 -0600)]
If the auth_type setting in /etc/security/login.cfg is set to
PAM_AUTH but pam_start() fails, fall back to use AIX authentication.
Skip the auth_type check if sudo is not compiled with PAM support.

8 years agoThe header for sudo.conf(5) should be SUDO.CONF(5) not SUDO(5).
Todd C. Miller [Thu, 17 Mar 2016 16:46:23 +0000 (10:46 -0600)]
The header for sudo.conf(5) should be SUDO.CONF(5) not SUDO(5).

8 years agohook_version and hook_type are unsigned so use 0, not -1 in the
Todd C. Miller [Wed, 16 Mar 2016 16:53:43 +0000 (10:53 -0600)]
hook_version and hook_type are unsigned so use 0, not -1 in the
final (empty) entry.  Quiets a warning on Solaris Studio 12.2.

8 years agoWork around an ambiguity in the PAM spec with respect to the conversation
Todd C. Miller [Wed, 9 Mar 2016 16:39:46 +0000 (09:39 -0700)]
Work around an ambiguity in the PAM spec with respect to the conversation
function.  It is not clear whether the "struct pam_message **msg" is an
array of pointers or a pointer to an array.  Linux-PAM and OpenPAM use
an array of pointers while Solaris/HP-UX/AIX uses a pointer to an array.
Bug #726.

8 years agosync with translationproject.org
Todd C. Miller [Tue, 8 Mar 2016 17:04:46 +0000 (10:04 -0700)]
sync with translationproject.org

8 years agoBug #738
Todd C. Miller [Sat, 27 Feb 2016 23:56:56 +0000 (16:56 -0700)]
Bug #738

8 years agosync with translationproject.org
Todd C. Miller [Fri, 26 Feb 2016 21:39:00 +0000 (14:39 -0700)]
sync with translationproject.org

8 years agoBetter test for negated character classes.
Todd C. Miller [Fri, 26 Feb 2016 18:24:25 +0000 (11:24 -0700)]
Better test for negated character classes.

8 years agoAdd test for negated character class
Todd C. Miller [Fri, 26 Feb 2016 18:14:50 +0000 (11:14 -0700)]
Add test for negated character class

8 years agosync with translationproject.org
Todd C. Miller [Fri, 26 Feb 2016 18:02:29 +0000 (11:02 -0700)]
sync with translationproject.org

8 years agosync
Todd C. Miller [Fri, 26 Feb 2016 17:58:52 +0000 (10:58 -0700)]
sync

8 years agoFix negation of character classes.
Todd C. Miller [Fri, 26 Feb 2016 17:52:55 +0000 (10:52 -0700)]
Fix negation of character classes.

8 years agoFix the check for whether a user is allowed to lists another user's
Todd C. Miller [Fri, 26 Feb 2016 16:32:08 +0000 (09:32 -0700)]
Fix the check for whether a user is allowed to lists another user's
privileges.  The "matched" variable is not boolean, it can also
have the value UNSPEC so we need to check explicitly for true.
Bug #738

8 years agoLog the number of PAM messages in the conversation function at debug
Todd C. Miller [Fri, 26 Feb 2016 16:30:31 +0000 (09:30 -0700)]
Log the number of PAM messages in the conversation function at debug
level.

8 years agoDon't check for posix_spawn() or posix_spawnp() if we were unable
Todd C. Miller [Wed, 24 Feb 2016 23:00:08 +0000 (16:00 -0700)]
Don't check for posix_spawn() or posix_spawnp() if we were unable
to find spawn.h.  This should only be a problem on systems with
broken headers.  Bug #730

8 years agoupdate for 1.8.16
Todd C. Miller [Tue, 23 Feb 2016 00:03:42 +0000 (17:03 -0700)]
update for 1.8.16

8 years agoFix documented bug with duplicate role names and turn on perl warnings.
Todd C. Miller [Mon, 22 Feb 2016 18:07:33 +0000 (11:07 -0700)]
Fix documented bug with duplicate role names and turn on perl warnings.
Based on a diff from Aaron Peschel

8 years agoAdd declaration of getauthdb() for AIX 5.1
Todd C. Miller [Sat, 20 Feb 2016 23:42:34 +0000 (16:42 -0700)]
Add declaration of getauthdb() for AIX 5.1

8 years agoregen
Todd C. Miller [Fri, 19 Feb 2016 22:50:38 +0000 (15:50 -0700)]
regen

8 years agosync with translationproject.org
Todd C. Miller [Fri, 19 Feb 2016 22:48:39 +0000 (15:48 -0700)]
sync with translationproject.org

8 years agoAdd a note that --with-solaris-audit is only for Solaris 11 and
Todd C. Miller [Fri, 19 Feb 2016 20:37:43 +0000 (13:37 -0700)]
Add a note that --with-solaris-audit is only for Solaris 11 and
above.  Bug #737

8 years agoRemove last remnants of the deprecated --with-stow option.
Todd C. Miller [Thu, 18 Feb 2016 23:18:30 +0000 (16:18 -0700)]
Remove last remnants of the deprecated --with-stow option.

8 years agosrc/load_plugins.c needs _PATH_SUDO_CONF so allow it to be overridden
Todd C. Miller [Thu, 18 Feb 2016 23:13:51 +0000 (16:13 -0700)]
src/load_plugins.c needs _PATH_SUDO_CONF so allow it to be overridden
via the Makefile like other consumers of _PATH_SUDO_CONF.  Bug #735

8 years agoAdd an administrative domain to the passwd/group cache key for
Todd C. Miller [Mon, 1 Feb 2016 18:08:58 +0000 (11:08 -0700)]
Add an administrative domain to the passwd/group cache key for
AIX which can have different name <-> ID mappings depending
on whether the database is local, LDAP, etc.

8 years agoFedora dropped "core" from the name some time ago so just match on
Todd C. Miller [Mon, 1 Feb 2016 18:07:10 +0000 (11:07 -0700)]
Fedora dropped "core" from the name some time ago so just match on
f[0-9] for the rpm distro name provided by pp.  Since the version
numbers of Fedora and RHEL are so different switch to defining
variables to indicate which features should be enabled.  Works for
Fedora 23.

8 years agoTreat fedora core like centos/rhel for package building.
Todd C. Miller [Sun, 31 Jan 2016 14:36:44 +0000 (07:36 -0700)]
Treat fedora core like centos/rhel for package building.

8 years agoPlug some memory leaks in the tests.
Todd C. Miller [Fri, 29 Jan 2016 18:34:09 +0000 (11:34 -0700)]
Plug some memory leaks in the tests.

8 years agoIf realloc of sudoerslval.command.args fails, reset sudoerslval.command.args
Todd C. Miller [Fri, 29 Jan 2016 18:10:36 +0000 (11:10 -0700)]
If realloc of sudoerslval.command.args fails, reset sudoerslval.command.args
as well as arg_len and arg_size after freeing sudoerslval.command.args.

8 years agoWhen freeing the iobs after pty tear-down, also free the associated
Todd C. Miller [Fri, 29 Jan 2016 17:31:54 +0000 (10:31 -0700)]
When freeing the iobs after pty tear-down, also free the associated
event structures.  Quiets a memory leak warnings from address
sanitizer and valgrind.

8 years agoiolog_compress should be bool, not int
Todd C. Miller [Thu, 28 Jan 2016 22:36:15 +0000 (15:36 -0700)]
iolog_compress should be bool, not int

8 years agoQuiet address sanitizer leak detector.
Todd C. Miller [Thu, 28 Jan 2016 22:07:54 +0000 (15:07 -0700)]
Quiet address sanitizer leak detector.

8 years agoSimple garbage collection (really a to-be-freed list) for the sudoers
Todd C. Miller [Thu, 28 Jan 2016 21:53:48 +0000 (14:53 -0700)]
Simple garbage collection (really a to-be-freed list) for the sudoers
plugin.  Almost identical to what sudo.c uses.  Currenly only the
environment strings are collected at exit time which is enough to
quiet address sanitizer's leak detector.

8 years agoRename gc_cleanup to gc_run and remove I/O plugins from the plugin
Todd C. Miller [Thu, 28 Jan 2016 21:48:11 +0000 (14:48 -0700)]
Rename gc_cleanup to gc_run and remove I/O plugins from the plugin
list when freeing them.

8 years agoFree up the garbage via an atexit() handler instead of requiring
Todd C. Miller [Thu, 28 Jan 2016 18:01:42 +0000 (11:01 -0700)]
Free up the garbage via an atexit() handler instead of requiring
a call to gc_exit.

8 years agoPlug a memory leak in sudo_edit.
Todd C. Miller [Thu, 28 Jan 2016 17:54:34 +0000 (10:54 -0700)]
Plug a memory leak in sudo_edit.

8 years agomention --enable-asan
Todd C. Miller [Wed, 27 Jan 2016 23:49:24 +0000 (16:49 -0700)]
mention --enable-asan

8 years agoTry to deconfuse static analyzers a bit.
Todd C. Miller [Wed, 27 Jan 2016 23:19:22 +0000 (16:19 -0700)]
Try to deconfuse static analyzers a bit.

8 years agoAvoid possible NULL deref found by clang analyzer.
Todd C. Miller [Wed, 27 Jan 2016 23:07:35 +0000 (16:07 -0700)]
Avoid possible NULL deref found by clang analyzer.

8 years agoAdd --enable-asan configure flag to enable address sanitizer
Todd C. Miller [Wed, 27 Jan 2016 22:37:25 +0000 (15:37 -0700)]
Add --enable-asan configure flag to enable address sanitizer

8 years agoAdd support for garbage collecting info passed to the plugin before
Todd C. Miller [Wed, 27 Jan 2016 22:37:15 +0000 (15:37 -0700)]
Add support for garbage collecting info passed to the plugin before
exit to appease address sanitizer's leak detector (and valgrind's
leak checker).  We can't free these sooner since the plugin may be
using the memory.  For plugin API 2.0 it should be make clear that
the plugin must make a copy of the data in the arrays passed in to
the plugin's open() function.  Only enabled if NO_LEAKS is defined.

8 years agoauth_getpass() returns a dynamically allocated copy of the plaintext
Todd C. Miller [Wed, 27 Jan 2016 22:36:50 +0000 (15:36 -0700)]
auth_getpass() returns a dynamically allocated copy of the plaintext
password which needs to be freed after checking (and clearing) it.

8 years agoRemove sudo_fatalx() calls from format_plugin_settings().
Todd C. Miller [Wed, 27 Jan 2016 20:59:04 +0000 (13:59 -0700)]
Remove sudo_fatalx() calls from format_plugin_settings().

8 years agofn_free_result() (aka sss_sudo_free_result() in sss_sudo.c) handles
Todd C. Miller [Wed, 27 Jan 2016 16:28:08 +0000 (09:28 -0700)]
fn_free_result() (aka sss_sudo_free_result() in sss_sudo.c) handles
a NULL poiner so there's no need to check before calling it.  Add
missing initialization of sss_sudo_result to NULL in sudo_sss_setdefs().

8 years agoAdd missing return when user is not found in sudo_sss_result_get().
Todd C. Miller [Wed, 27 Jan 2016 16:20:04 +0000 (09:20 -0700)]
Add missing return when user is not found in sudo_sss_result_get().
Previously we fell through to the default case which just logged a
debug message and returned so this just avoids the extra (generic)
debug message.

8 years agoFix a warning on AIX.
Todd C. Miller [Tue, 26 Jan 2016 21:35:14 +0000 (14:35 -0700)]
Fix a warning on AIX.

8 years agoPass updated user_env_out, not envp, to the I/O open function.
Todd C. Miller [Tue, 26 Jan 2016 14:42:57 +0000 (07:42 -0700)]
Pass updated user_env_out, not envp, to the I/O open function.

8 years agoPass updated argv/envp to the I/O open function like the plugin API
Todd C. Miller [Tue, 26 Jan 2016 14:39:43 +0000 (07:39 -0700)]
Pass updated argv/envp to the I/O open function like the plugin API
documents.

8 years agoAdd check for I/O log file handle being NULL. This could only
Todd C. Miller [Mon, 25 Jan 2016 23:18:22 +0000 (16:18 -0700)]
Add check for I/O log file handle being NULL.  This could only
happen if the front-end calls iolog_open with argc == 0 but actually
runs a command.

8 years agoAdditional debugging for pwutil functions.
Todd C. Miller [Sat, 23 Jan 2016 00:04:59 +0000 (17:04 -0700)]
Additional debugging for pwutil functions.

8 years agoWhen calling setauthdb(), save the old registry value so we can
Todd C. Miller [Sat, 23 Jan 2016 00:04:58 +0000 (17:04 -0700)]
When calling setauthdb(), save the old registry value so we can
restore it properly.  Previously we were setting the registry to
unrestricted instead of actually restoring it.

8 years agoUse SUDOERS_DEBUG_UTIL not SUDO_DEBUG_UTIL in the plugin.
Todd C. Miller [Fri, 22 Jan 2016 18:22:58 +0000 (11:22 -0700)]
Use SUDOERS_DEBUG_UTIL not SUDO_DEBUG_UTIL in the plugin.

8 years agoWhen parsing debug entries, don't make a lower value override a
Todd C. Miller [Thu, 21 Jan 2016 14:43:25 +0000 (07:43 -0700)]
When parsing debug entries, don't make a lower value override a
higher one.  For example, for "pcomm@debug,all@warn" the "all@warn"
should not set pcomm to "warn" when it is already at "debug".

8 years agoSet sudoedit_checkdir=false in command_details when it is disabled
Todd C. Miller [Wed, 20 Jan 2016 22:51:43 +0000 (15:51 -0700)]
Set sudoedit_checkdir=false in command_details when it is disabled
in sudoers.

8 years agoUpdate copyright year
Todd C. Miller [Wed, 20 Jan 2016 22:40:51 +0000 (15:40 -0700)]
Update copyright year

8 years agoIf the user runs "sudoedit /" we will receive ENOENT from openat(2)
Todd C. Miller [Wed, 20 Jan 2016 22:36:20 +0000 (15:36 -0700)]
If the user runs "sudoedit /" we will receive ENOENT from openat(2)
and sudoedit will try to create a file with the null string.  If
path is empty, open the cwd instead so sudoedit can give a sensible
error message.

8 years agoLog an error for invalid boolean strings.
Todd C. Miller [Wed, 20 Jan 2016 22:34:00 +0000 (15:34 -0700)]
Log an error for invalid boolean strings.

8 years agoFix off by one error in new SET_FLAG macro.
Todd C. Miller [Wed, 20 Jan 2016 22:09:32 +0000 (15:09 -0700)]
Fix off by one error in new SET_FLAG macro.

8 years agoDocument the race with sudoedit_checkdir in 1.8.15.
Todd C. Miller [Wed, 20 Jan 2016 18:00:05 +0000 (11:00 -0700)]
Document the race with sudoedit_checkdir in 1.8.15.

8 years agoDocument sudoedit_checkdir
Todd C. Miller [Wed, 20 Jan 2016 17:56:47 +0000 (10:56 -0700)]
Document sudoedit_checkdir

8 years agoThere are no systems that support O_SEARCH/O_PATH that do not also
Todd C. Miller [Wed, 20 Jan 2016 02:50:27 +0000 (19:50 -0700)]
There are no systems that support O_SEARCH/O_PATH that do not also
support O_DIRECTORY so simplify the definition of DIR_OPEN_FLAGS a
bit.

8 years agoregen
Todd C. Miller [Tue, 19 Jan 2016 22:23:07 +0000 (15:23 -0700)]
regen

8 years agoAdd 1.8.16 changes
Todd C. Miller [Tue, 19 Jan 2016 22:21:15 +0000 (15:21 -0700)]
Add 1.8.16 changes

8 years agoMake sudoedit_checkdir the default and update the documentation accordingly.
Todd C. Miller [Tue, 19 Jan 2016 21:16:25 +0000 (14:16 -0700)]
Make sudoedit_checkdir the default and update the documentation accordingly.

8 years agoAdd a SET_FLAG macro to simplify parsing command details boolean
Todd C. Miller [Tue, 19 Jan 2016 17:32:33 +0000 (10:32 -0700)]
Add a SET_FLAG macro to simplify parsing command details boolean
flags.  Previously, flags were only set and never cleared even if
the boolean value was false.  This was not a problem as there were
no default flags for the plugin to enable.  That will change in the
future.

8 years agoNeed to be root when switching to a different user.
Todd C. Miller [Mon, 18 Jan 2016 20:12:50 +0000 (13:12 -0700)]
Need to be root when switching to a different user.

8 years agoUse O_SEARCH on systems without O_PATH if present. It can be used
Todd C. Miller [Mon, 18 Jan 2016 19:38:41 +0000 (12:38 -0700)]
Use O_SEARCH on systems without O_PATH if present.  It can be used
for a similar purpose.

8 years agoUse faccessat(2) for directory writability instead of doing the
Todd C. Miller [Mon, 18 Jan 2016 17:45:47 +0000 (10:45 -0700)]
Use faccessat(2) for directory writability instead of doing the
checks manually where possible.  This also allows us to remove the
#ifdef __linux__ bits since we no longer use fstat(2) on Linux with
an O_PATH fd.

8 years agoAdd "I/O LOG FILES" section to the manual and move many of the
Todd C. Miller [Sat, 16 Jan 2016 23:47:42 +0000 (16:47 -0700)]
Add "I/O LOG FILES" section to the manual and move many of the
details from the log_input and log_output descriptions to it.

8 years agoUse "Nm sudoers" when talking about the plugin and "Em sudoers" when
Todd C. Miller [Sat, 16 Jan 2016 23:46:17 +0000 (16:46 -0700)]
Use "Nm sudoers" when talking about the plugin and "Em sudoers" when
talking about the sudoers file.

8 years agoRemove gzopen_w which is only defined on Windows.
Todd C. Miller [Wed, 13 Jan 2016 20:40:19 +0000 (13:40 -0700)]
Remove gzopen_w which is only defined on Windows.

8 years agoWork around the buggy pread(2) on 32-bit HP-UX 11.00 by using
Todd C. Miller [Wed, 13 Jan 2016 18:10:33 +0000 (11:10 -0700)]
Work around the buggy pread(2) on 32-bit HP-UX 11.00 by using
pread64() on that platform.

8 years agoAdd support for matching the entire netgroup tuple (user, host, domain).
Todd C. Miller [Tue, 12 Jan 2016 21:59:44 +0000 (14:59 -0700)]
Add support for matching the entire netgroup tuple (user, host, domain).

8 years agoUse asprintf() to generate the netgroup filter instead of using
Todd C. Miller [Tue, 12 Jan 2016 21:29:09 +0000 (14:29 -0700)]
Use asprintf() to generate the netgroup filter instead of using
lots of concatenation.