Todd C. Miller [Thu, 7 Mar 2013 20:41:34 +0000 (15:41 -0500)]
Convert efree() to a macro that just casts to void * and does free().
If the system free() can't handle free(NULL) this may crash but C89
was a long time ago.
Todd C. Miller [Thu, 7 Mar 2013 16:54:17 +0000 (11:54 -0500)]
Define _REENTRANT for HP-UX when we add -lpthread to SUDO_LIBS.
Fixes a problem with errno sometimes not being set on error on HP-UX.
Todd C. Miller [Thu, 7 Mar 2013 15:06:01 +0000 (10:06 -0500)]
Fix debug logging from the plugin when there is no error number.
This was broken in the big debugging reorg for 1.8.7.
Todd C. Miller [Wed, 6 Mar 2013 22:08:10 +0000 (17:08 -0500)]
Always install plugins with a .so extension regardless of what
extension the system uses for shared libraries. That way the
group_plugin sudoers setting can be shared between heterogenous
systems.
Todd C. Miller [Wed, 6 Mar 2013 22:05:23 +0000 (17:05 -0500)]
Mac OS X has netgroup functions in netdb.h.
Todd C. Miller [Wed, 6 Mar 2013 22:02:35 +0000 (17:02 -0500)]
Tags in struct cmndtag can be set to IMPLIED as well.
Todd C. Miller [Wed, 6 Mar 2013 21:50:35 +0000 (16:50 -0500)]
Quiet a compiler warning.
Todd C. Miller [Wed, 6 Mar 2013 21:48:43 +0000 (16:48 -0500)]
Quiet an llvm checker warning.
Todd C. Miller [Wed, 6 Mar 2013 20:56:26 +0000 (15:56 -0500)]
Quiet gcc -Wuninitialized false positive
Todd C. Miller [Tue, 5 Mar 2013 21:38:35 +0000 (16:38 -0500)]
Document group_file and system_group plugins.
Todd C. Miller [Tue, 5 Mar 2013 20:06:29 +0000 (15:06 -0500)]
Sudo 1.8.7
Todd C. Miller [Tue, 5 Mar 2013 20:06:00 +0000 (15:06 -0500)]
Try to clarify that sudoedit in sudoers should not include a
leading pathname.
Todd C. Miller [Tue, 5 Mar 2013 19:06:51 +0000 (14:06 -0500)]
Make sure groupname_len is at least 32 just to be on the safe side.
It is better to allocate a little extra and not need it than to
have to reallocate and start over.
Todd C. Miller [Tue, 5 Mar 2013 15:18:32 +0000 (10:18 -0500)]
Add __malloc_like macro to apply __malloc__ attribute to emalloc,
ecalloc and estrdup. It cannot be applied to realloc since that
may return the same pointer.
Todd C. Miller [Tue, 5 Mar 2013 15:16:50 +0000 (10:16 -0500)]
Fix potential double free in an error path.
Todd C. Miller [Tue, 5 Mar 2013 11:56:57 +0000 (06:56 -0500)]
When running the command in a pty, defer the call to exec_setup()
until just before we exec the command. This is consistent with the
non-pty path. As a side effect, the monitor process runs as root
and not the runas user.
Todd C. Miller [Sat, 2 Mar 2013 19:01:30 +0000 (14:01 -0500)]
Update copyright year.
Todd C. Miller [Fri, 1 Mar 2013 18:01:37 +0000 (13:01 -0500)]
Use pst_highestfd from pstat_getproc() on HP-UX.
Todd C. Miller [Thu, 28 Feb 2013 14:49:09 +0000 (09:49 -0500)]
Clean up generated test files and other minor housekeeping.
Todd C. Miller [Thu, 28 Feb 2013 14:25:10 +0000 (09:25 -0500)]
Add back gettimeofday() call inadvertantly removed in
e1abb9810a83
Todd C. Miller [Thu, 28 Feb 2013 14:01:08 +0000 (09:01 -0500)]
Use pstat() on HP-UX to determine the tty device.
Todd C. Miller [Thu, 28 Feb 2013 13:38:06 +0000 (08:38 -0500)]
Fix PAM compilation: def_pam_session, not just pam_session.
Todd C. Miller [Thu, 28 Feb 2013 11:03:36 +0000 (06:03 -0500)]
Don't remove the -S option description when trimming out selinux.
Bug #592
Todd C. Miller [Mon, 25 Feb 2013 19:45:23 +0000 (14:45 -0500)]
Update for Sudo 1.8.6p7
Todd C. Miller [Sun, 24 Feb 2013 18:25:44 +0000 (13:25 -0500)]
Document when sudo may exec the command directly instead of forking.
Todd C. Miller [Sun, 24 Feb 2013 18:20:56 +0000 (13:20 -0500)]
Document that close and version be NULL for plugin API >= 1.3 and
that sudo may execute the command directly if there is no close,
or pty or timeout needed.
Todd C. Miller [Sun, 24 Feb 2013 18:04:58 +0000 (13:04 -0500)]
Fix debug_decl for sudo_auth_begin_session and sudo_auth_end_session.
Todd C. Miller [Sun, 24 Feb 2013 11:15:37 +0000 (06:15 -0500)]
Add pam_session sudoers option.
Todd C. Miller [Sun, 24 Feb 2013 10:54:57 +0000 (05:54 -0500)]
Dummy out close function if there is no end_session for the auth
method and the front-end can handle a NULL close function. Avoids
the extra sudo process when we don't actually need it.
Todd C. Miller [Sat, 23 Feb 2013 20:45:34 +0000 (15:45 -0500)]
Add m4/ to paths m4_include parameters so we don't need to use
autoconf's -I flag.
Todd C. Miller [Sat, 23 Feb 2013 19:19:07 +0000 (14:19 -0500)]
If the policy plugin does not provide a close function, there is
no command timeout and no pty is required, skip the event loop and
just exec the command directly.
Todd C. Miller [Sat, 23 Feb 2013 18:53:48 +0000 (13:53 -0500)]
Do not crash if the plugin close and version functions are not
defined. If there is no policy close function, simply print a
warning that the command was not found.
Todd C. Miller [Thu, 21 Feb 2013 20:59:21 +0000 (15:59 -0500)]
Fix typos in selinux/solaris privs specific code.
Todd C. Miller [Thu, 21 Feb 2013 20:05:51 +0000 (15:05 -0500)]
Pass the default plugin directory to the plugin via the settings list.
Could be used by a stacking plugin.
Todd C. Miller [Thu, 21 Feb 2013 15:05:16 +0000 (10:05 -0500)]
Completely ignore time stamp file if it is set to the epoch,
regardless of what gettimeofday() returns.
Todd C. Miller [Thu, 21 Feb 2013 12:04:34 +0000 (07:04 -0500)]
Add Nikolai Kondrashov
Todd C. Miller [Thu, 21 Feb 2013 12:03:52 +0000 (07:03 -0500)]
Use userpw_matches() for username matching so #uid works for
sudoRunAsUser.
Todd C. Miller [Thu, 21 Feb 2013 12:01:53 +0000 (07:01 -0500)]
Avoid calling realloc3() with a zero size parameter when all retrieved
sssd rules fail. Otherwise we'll get a run-time error due to
malloc(0) checking.
Todd C. Miller [Thu, 21 Feb 2013 11:54:30 +0000 (06:54 -0500)]
Do not send error mail if a user is not found in SSSD. Local users
can run sudo too. From Nikolai Kondrashov
Todd C. Miller [Wed, 20 Feb 2013 20:48:53 +0000 (15:48 -0500)]
Test setting disable_coredump to illegal value.
Todd C. Miller [Wed, 20 Feb 2013 20:48:12 +0000 (15:48 -0500)]
Fix atobool() usage.
Todd C. Miller [Wed, 20 Feb 2013 20:47:27 +0000 (15:47 -0500)]
Remove unused variable.
Todd C. Miller [Wed, 20 Feb 2013 20:35:26 +0000 (15:35 -0500)]
Make "sudo -l non_existent_command" warn that non_existent_command
doesn't exist, not the "list" pseudo-command.
Todd C. Miller [Wed, 20 Feb 2013 20:09:21 +0000 (15:09 -0500)]
Make sudoers file long list output better match the format used by
ldap sudoers. Tags are now converted to options and there is a
single command per line.
Todd C. Miller [Wed, 20 Feb 2013 18:54:31 +0000 (13:54 -0500)]
Use the correct the sudoers policy symbol names and undo an editor
goof committed when adding max_groups to sudo.conf.
Todd C. Miller [Wed, 20 Feb 2013 15:47:31 +0000 (10:47 -0500)]
For "sudo -l" start a new line if the runas list changes to make
the output easier to read.
Todd C. Miller [Tue, 19 Feb 2013 21:29:17 +0000 (16:29 -0500)]
For "sudo -l" and "sudo -ll" only print the runas info for subsequent
commands in a list if the runas info has changed. If we have new
runas info, print out the tags again so as to be less confusing to
the user. For "sudo -ll" set the line continuation indent to 8.
Todd C. Miller [Mon, 18 Feb 2013 20:32:36 +0000 (15:32 -0500)]
Rename sample_group plugin to group_file.
Install group_file and system_group plugins by default.
Todd C. Miller [Mon, 18 Feb 2013 20:06:23 +0000 (15:06 -0500)]
Add maxseq sudoers option to limit the max number of I/O log files.
Todd C. Miller [Sat, 16 Feb 2013 16:12:48 +0000 (11:12 -0500)]
Log lines and columns in the iolog file.
Todd C. Miller [Fri, 15 Feb 2013 19:42:10 +0000 (14:42 -0500)]
Add simple regress tests for sudo.conf parsing.
Todd C. Miller [Fri, 15 Feb 2013 17:31:49 +0000 (12:31 -0500)]
Always display the I/O plugin version as long as its open functions
doesn't return an error. Previously it was only displayed if the
plugin open returned 1.
Todd C. Miller [Fri, 15 Feb 2013 15:20:21 +0000 (10:20 -0500)]
Use sysconf(_SC_LOGIN_NAME_MAX) to find max username length instead
of poking around in struct utmpx.
Todd C. Miller [Fri, 15 Feb 2013 13:57:21 +0000 (08:57 -0500)]
#include "sudo_usage.h" not <sudo_usage.h> so we get the one in the
build directory and not the src dir when using a separate build
directory.
Todd C. Miller [Thu, 14 Feb 2013 21:34:13 +0000 (16:34 -0500)]
If a line was longer that 0x80000000 the bit hack to round to the
next power of two would roll over to zero.
Todd C. Miller [Thu, 14 Feb 2013 20:52:27 +0000 (15:52 -0500)]
Use max_groups in front-end and plugin.
Todd C. Miller [Thu, 14 Feb 2013 20:18:10 +0000 (15:18 -0500)]
Pass max_groups to plugin in settings list.
Todd C. Miller [Thu, 14 Feb 2013 18:34:33 +0000 (13:34 -0500)]
Add max_groups setting to sudo.conf (currently unused) and remove
unused return value from setters.
Todd C. Miller [Tue, 12 Feb 2013 21:43:29 +0000 (16:43 -0500)]
Reorganize configure options
Todd C. Miller [Mon, 11 Feb 2013 20:57:36 +0000 (15:57 -0500)]
Add Sudo 1.8.6p7
Todd C. Miller [Sun, 10 Feb 2013 19:34:55 +0000 (14:34 -0500)]
Sync with autoconf 2.68
Todd C. Miller [Sun, 10 Feb 2013 14:45:06 +0000 (09:45 -0500)]
Remove obsolete OS notes and move build requirements to INSTALL.
Todd C. Miller [Fri, 8 Feb 2013 19:44:22 +0000 (14:44 -0500)]
Sort elements of the settings, user_info and command_info lists.
Todd C. Miller [Fri, 8 Feb 2013 19:40:43 +0000 (14:40 -0500)]
Remove trailing white space
Todd C. Miller [Fri, 8 Feb 2013 15:43:14 +0000 (10:43 -0500)]
Store the session ID in the tty ticket file too. A tty may only
be in one session at a time so if the session ID doesn't match we
ignore the ticket.
Todd C. Miller [Thu, 7 Feb 2013 19:31:48 +0000 (14:31 -0500)]
Move tzset() call from sudoers plugin to sudo front end.
Todd C. Miller [Thu, 7 Feb 2013 19:08:54 +0000 (14:08 -0500)]
Mention line continuation
Todd C. Miller [Thu, 7 Feb 2013 15:56:01 +0000 (10:56 -0500)]
Add line continuation support to sudo_parseln() and make it use
getline() instead of fgets() internally.
Todd C. Miller [Wed, 6 Feb 2013 21:38:31 +0000 (16:38 -0500)]
Fix memory leak in error path; found by llvm checker
Todd C. Miller [Wed, 6 Feb 2013 21:35:19 +0000 (16:35 -0500)]
Remove useless store detected by llvm checker.
Todd C. Miller [Wed, 6 Feb 2013 19:06:51 +0000 (14:06 -0500)]
Sudo now stores its libexec files in a "sudo" subdirectory instead
of in libexec itself. For backwards compatibility, if the plugin
is not found in the default plugin directory, sudo will check the
parent directory default directory ends in "/sudo".
Todd C. Miller [Wed, 6 Feb 2013 18:08:48 +0000 (13:08 -0500)]
Add missing __dso_public to plugin structs so they are exported.
Todd C. Miller [Wed, 6 Feb 2013 14:30:49 +0000 (09:30 -0500)]
Mention that sudoers has its own plugins too.
Todd C. Miller [Tue, 5 Feb 2013 21:14:05 +0000 (16:14 -0500)]
Correct last change date.
Todd C. Miller [Tue, 5 Feb 2013 21:12:39 +0000 (16:12 -0500)]
Remove duplicated sudo.conf info in the sudo, sudoers and sudo_plugin
manuals and cross-reference the new sudo.conf manual.
Todd C. Miller [Tue, 5 Feb 2013 21:10:16 +0000 (16:10 -0500)]
Fix typos
Todd C. Miller [Tue, 5 Feb 2013 21:09:26 +0000 (16:09 -0500)]
Fix some typos.
Todd C. Miller [Tue, 5 Feb 2013 16:43:02 +0000 (11:43 -0500)]
Add standalone sudo.conf manual page.
Todd C. Miller [Tue, 5 Feb 2013 16:42:46 +0000 (11:42 -0500)]
add group_source example
Todd C. Miller [Tue, 5 Feb 2013 15:56:58 +0000 (10:56 -0500)]
Use PLUGINDIR in the manuals and fix a typo in the sample sudo.conf.
Todd C. Miller [Tue, 5 Feb 2013 15:53:59 +0000 (10:53 -0500)]
Sync with translationproject.org
Todd C. Miller [Sun, 3 Feb 2013 18:46:48 +0000 (13:46 -0500)]
Sync with translationproject.org
Todd C. Miller [Fri, 1 Feb 2013 21:00:50 +0000 (16:00 -0500)]
Sync with translationproject.org
Todd C. Miller [Thu, 31 Jan 2013 21:06:49 +0000 (16:06 -0500)]
Clarify ttyname changes.
Todd C. Miller [Thu, 31 Jan 2013 16:45:33 +0000 (11:45 -0500)]
Add 1.8.6p6
Todd C. Miller [Thu, 31 Jan 2013 16:05:56 +0000 (11:05 -0500)]
Remove ttyname() fall back code on systems where we can query the
kernel for the tty device via /proc or sysctl(). If there is no
controlling tty, it is better to just treat the tty as unknown
rather than to blindly use what is hooked up to std{in,out,err}.
Todd C. Miller [Sun, 27 Jan 2013 18:53:11 +0000 (13:53 -0500)]
Add group_source setting in sudo.conf to allow the admin to specify
how a user's groups are looked up. Legal values are static (just
the kernel list from getgroups), dynamic (whatever the group database
includes) and adaptive (only use group db if kernel group list is
full).
Todd C. Miller [Sun, 27 Jan 2013 18:45:35 +0000 (13:45 -0500)]
Pass back exec_background to front end if it is enabled in sudoers.
Todd C. Miller [Sun, 27 Jan 2013 18:43:02 +0000 (13:43 -0500)]
Mention that exec_background is for 1.8.7 and higher only.
Todd C. Miller [Thu, 24 Jan 2013 17:05:33 +0000 (12:05 -0500)]
Add missing test files.
Todd C. Miller [Thu, 24 Jan 2013 16:57:38 +0000 (11:57 -0500)]
Add regress test for bug 361
Todd C. Miller [Thu, 24 Jan 2013 14:01:03 +0000 (09:01 -0500)]
Add __dso_public to extern declaration of declaration to match
actual definition.
Todd C. Miller [Thu, 24 Jan 2013 12:44:10 +0000 (07:44 -0500)]
Add 1.8.6p5
Todd C. Miller [Wed, 23 Jan 2013 13:24:11 +0000 (08:24 -0500)]
Add test for visudo cycle check core dump; test case from Daniel Kopecek
Todd C. Miller [Wed, 23 Jan 2013 12:52:09 +0000 (07:52 -0500)]
Fix potential stack overflow due to infinite recursion in alias
cycle detection. From Daniel Kopecek.
Todd C. Miller [Wed, 23 Jan 2013 11:33:53 +0000 (06:33 -0500)]
Ignore duplicate entries in sudo.conf and report the line number
when there is an error. Warn, don't abort if there is more than
one policy plugin.
Todd C. Miller [Wed, 23 Jan 2013 11:21:45 +0000 (06:21 -0500)]
Use strtoul() not atoi().
Todd C. Miller [Tue, 22 Jan 2013 20:48:52 +0000 (15:48 -0500)]
regen depends for to add compat/nss_dbdefs.h for getgrouplist.lo
Todd C. Miller [Tue, 22 Jan 2013 20:48:16 +0000 (15:48 -0500)]
Fix typo that breaks the build on HP-UX.
Todd C. Miller [Tue, 22 Jan 2013 20:41:15 +0000 (15:41 -0500)]
Use nss_search() to implement getgrouplist() where available. Tested
on Solaris and HP-UX. We need to include a compatibility header
for HP-UX which uses the Solaris nsswitch implementation but doesn't
ship nss_dbdefs.h.