]> granicus.if.org Git - sudo/log
sudo
11 years agoMac OS X has netgroup functions in netdb.h.
Todd C. Miller [Wed, 6 Mar 2013 22:05:23 +0000 (17:05 -0500)]
Mac OS X has netgroup functions in netdb.h.

11 years agoTags in struct cmndtag can be set to IMPLIED as well.
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.

11 years agoQuiet a compiler warning.
Todd C. Miller [Wed, 6 Mar 2013 21:50:35 +0000 (16:50 -0500)]
Quiet a compiler warning.

11 years agoQuiet an llvm checker warning.
Todd C. Miller [Wed, 6 Mar 2013 21:48:43 +0000 (16:48 -0500)]
Quiet an llvm checker warning.

11 years agoQuiet gcc -Wuninitialized false positive
Todd C. Miller [Wed, 6 Mar 2013 20:56:26 +0000 (15:56 -0500)]
Quiet gcc -Wuninitialized false positive

11 years agoDocument group_file and system_group plugins.
Todd C. Miller [Tue, 5 Mar 2013 21:38:35 +0000 (16:38 -0500)]
Document group_file and system_group plugins.

11 years agoSudo 1.8.7
Todd C. Miller [Tue, 5 Mar 2013 20:06:29 +0000 (15:06 -0500)]
Sudo 1.8.7

11 years agoTry to clarify that sudoedit in sudoers should not include a
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.

11 years agoMake sure groupname_len is at least 32 just to be on the safe side.
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.

11 years agoAdd __malloc_like macro to apply __malloc__ attribute to emalloc,
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.

11 years agoFix potential double free in an error path.
Todd C. Miller [Tue, 5 Mar 2013 15:16:50 +0000 (10:16 -0500)]
Fix potential double free in an error path.

11 years agoWhen running the command in a pty, defer the call to exec_setup()
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.

11 years agoUpdate copyright year.
Todd C. Miller [Sat, 2 Mar 2013 19:01:30 +0000 (14:01 -0500)]
Update copyright year.

11 years agoUse pst_highestfd from pstat_getproc() on HP-UX.
Todd C. Miller [Fri, 1 Mar 2013 18:01:37 +0000 (13:01 -0500)]
Use pst_highestfd from pstat_getproc() on HP-UX.

11 years agoClean up generated test files and other minor housekeeping.
Todd C. Miller [Thu, 28 Feb 2013 14:49:09 +0000 (09:49 -0500)]
Clean up generated test files and other minor housekeeping.

11 years agoAdd back gettimeofday() call inadvertantly removed in e1abb9810a83
Todd C. Miller [Thu, 28 Feb 2013 14:25:10 +0000 (09:25 -0500)]
Add back gettimeofday() call inadvertantly removed in e1abb9810a83

11 years agoUse pstat() on HP-UX to determine the tty device.
Todd C. Miller [Thu, 28 Feb 2013 14:01:08 +0000 (09:01 -0500)]
Use pstat() on HP-UX to determine the tty device.

11 years agoFix PAM compilation: def_pam_session, not just pam_session.
Todd C. Miller [Thu, 28 Feb 2013 13:38:06 +0000 (08:38 -0500)]
Fix PAM compilation: def_pam_session, not just pam_session.

11 years agoDon't remove the -S option description when trimming out selinux.
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

11 years agoUpdate for Sudo 1.8.6p7
Todd C. Miller [Mon, 25 Feb 2013 19:45:23 +0000 (14:45 -0500)]
Update for Sudo 1.8.6p7

11 years agoDocument when sudo may exec the command directly instead of forking.
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.

11 years agoDocument that close and version be NULL for plugin API >= 1.3 and
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.

11 years agoFix debug_decl for sudo_auth_begin_session and sudo_auth_end_session.
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.

11 years agoAdd pam_session sudoers option.
Todd C. Miller [Sun, 24 Feb 2013 11:15:37 +0000 (06:15 -0500)]
Add pam_session sudoers option.

11 years agoDummy out close function if there is no end_session for the auth
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.

11 years agoAdd m4/ to paths m4_include parameters so we don't need to use
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.

11 years agoIf the policy plugin does not provide a close function, there is
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.

11 years agoDo not crash if the plugin close and version functions are not
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.

11 years agoFix typos in selinux/solaris privs specific code.
Todd C. Miller [Thu, 21 Feb 2013 20:59:21 +0000 (15:59 -0500)]
Fix typos in selinux/solaris privs specific code.

11 years agoPass the default plugin directory to the plugin via the settings list.
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.

11 years agoCompletely ignore time stamp file if it is set to the epoch,
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.

11 years agoAdd Nikolai Kondrashov
Todd C. Miller [Thu, 21 Feb 2013 12:04:34 +0000 (07:04 -0500)]
Add Nikolai Kondrashov

11 years agoUse userpw_matches() for username matching so #uid works for
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.

11 years agoAvoid calling realloc3() with a zero size parameter when all retrieved
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.

11 years agoDo not send error mail if a user is not found in SSSD. Local users
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

11 years agoTest setting disable_coredump to illegal value.
Todd C. Miller [Wed, 20 Feb 2013 20:48:53 +0000 (15:48 -0500)]
Test setting disable_coredump to illegal value.

11 years agoFix atobool() usage.
Todd C. Miller [Wed, 20 Feb 2013 20:48:12 +0000 (15:48 -0500)]
Fix atobool() usage.

11 years agoRemove unused variable.
Todd C. Miller [Wed, 20 Feb 2013 20:47:27 +0000 (15:47 -0500)]
Remove unused variable.

11 years agoMake "sudo -l non_existent_command" warn that non_existent_command
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.

11 years agoMake sudoers file long list output better match the format used by
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.

11 years agoUse the correct the sudoers policy symbol names and undo an editor
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.

11 years agoFor "sudo -l" start a new line if the runas list changes to make
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.

11 years agoFor "sudo -l" and "sudo -ll" only print the runas info for subsequent
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.

11 years agoRename sample_group plugin to group_file.
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.

11 years agoAdd maxseq sudoers option to limit the max number of I/O log files.
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.

11 years agoLog lines and columns in the iolog file.
Todd C. Miller [Sat, 16 Feb 2013 16:12:48 +0000 (11:12 -0500)]
Log lines and columns in the iolog file.

11 years agoAdd simple regress tests for sudo.conf parsing.
Todd C. Miller [Fri, 15 Feb 2013 19:42:10 +0000 (14:42 -0500)]
Add simple regress tests for sudo.conf parsing.

11 years agoAlways display the I/O plugin version as long as its open functions
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.

11 years agoUse sysconf(_SC_LOGIN_NAME_MAX) to find max username length instead
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.

11 years ago#include "sudo_usage.h" not <sudo_usage.h> so we get the one in the
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.

11 years agoIf a line was longer that 0x80000000 the bit hack to round to the
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.

11 years agoUse max_groups in front-end and plugin.
Todd C. Miller [Thu, 14 Feb 2013 20:52:27 +0000 (15:52 -0500)]
Use max_groups in front-end and plugin.

11 years agoPass max_groups to plugin in settings list.
Todd C. Miller [Thu, 14 Feb 2013 20:18:10 +0000 (15:18 -0500)]
Pass max_groups to plugin in settings list.

11 years agoAdd max_groups setting to sudo.conf (currently unused) and remove
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.

11 years agoReorganize configure options
Todd C. Miller [Tue, 12 Feb 2013 21:43:29 +0000 (16:43 -0500)]
Reorganize configure options

11 years agoAdd Sudo 1.8.6p7
Todd C. Miller [Mon, 11 Feb 2013 20:57:36 +0000 (15:57 -0500)]
Add Sudo 1.8.6p7

11 years agoSync with autoconf 2.68
Todd C. Miller [Sun, 10 Feb 2013 19:34:55 +0000 (14:34 -0500)]
Sync with autoconf 2.68

11 years agoRemove obsolete OS notes and move build requirements to INSTALL.
Todd C. Miller [Sun, 10 Feb 2013 14:45:06 +0000 (09:45 -0500)]
Remove obsolete OS notes and move build requirements to INSTALL.

11 years agoSort elements of the settings, user_info and command_info lists.
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.

11 years agoRemove trailing white space
Todd C. Miller [Fri, 8 Feb 2013 19:40:43 +0000 (14:40 -0500)]
Remove trailing white space

11 years agoStore the session ID in the tty ticket file too. A tty may only
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.

11 years agoMove tzset() call from sudoers plugin to sudo front end.
Todd C. Miller [Thu, 7 Feb 2013 19:31:48 +0000 (14:31 -0500)]
Move tzset() call from sudoers plugin to sudo front end.

11 years agoMention line continuation
Todd C. Miller [Thu, 7 Feb 2013 19:08:54 +0000 (14:08 -0500)]
Mention line continuation

11 years agoAdd line continuation support to sudo_parseln() and make it use
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.

11 years agoFix memory leak in error path; found by llvm checker
Todd C. Miller [Wed, 6 Feb 2013 21:38:31 +0000 (16:38 -0500)]
Fix memory leak in error path; found by llvm checker

11 years agoRemove useless store detected by llvm checker.
Todd C. Miller [Wed, 6 Feb 2013 21:35:19 +0000 (16:35 -0500)]
Remove useless store detected by llvm checker.

11 years agoSudo now stores its libexec files in a "sudo" subdirectory instead
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".

11 years agoAdd missing __dso_public to plugin structs so they are exported.
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.

11 years agoMention that sudoers has its own plugins too.
Todd C. Miller [Wed, 6 Feb 2013 14:30:49 +0000 (09:30 -0500)]
Mention that sudoers has its own plugins too.

11 years agoCorrect last change date.
Todd C. Miller [Tue, 5 Feb 2013 21:14:05 +0000 (16:14 -0500)]
Correct last change date.

11 years agoRemove duplicated sudo.conf info in the sudo, sudoers and sudo_plugin
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.

11 years agoFix typos
Todd C. Miller [Tue, 5 Feb 2013 21:10:16 +0000 (16:10 -0500)]
Fix typos

11 years agoFix some typos.
Todd C. Miller [Tue, 5 Feb 2013 21:09:26 +0000 (16:09 -0500)]
Fix some typos.

11 years agoAdd standalone sudo.conf manual page.
Todd C. Miller [Tue, 5 Feb 2013 16:43:02 +0000 (11:43 -0500)]
Add standalone sudo.conf manual page.

11 years agoadd group_source example
Todd C. Miller [Tue, 5 Feb 2013 16:42:46 +0000 (11:42 -0500)]
add group_source example

11 years agoUse PLUGINDIR in the manuals and fix a typo in the sample sudo.conf.
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.

11 years agoSync with translationproject.org
Todd C. Miller [Tue, 5 Feb 2013 15:53:59 +0000 (10:53 -0500)]
Sync with translationproject.org

11 years agoSync with translationproject.org
Todd C. Miller [Sun, 3 Feb 2013 18:46:48 +0000 (13:46 -0500)]
Sync with translationproject.org

11 years agoSync with translationproject.org
Todd C. Miller [Fri, 1 Feb 2013 21:00:50 +0000 (16:00 -0500)]
Sync with translationproject.org

11 years agoClarify ttyname changes.
Todd C. Miller [Thu, 31 Jan 2013 21:06:49 +0000 (16:06 -0500)]
Clarify ttyname changes.

11 years agoAdd 1.8.6p6
Todd C. Miller [Thu, 31 Jan 2013 16:45:33 +0000 (11:45 -0500)]
Add 1.8.6p6

11 years agoRemove ttyname() fall back code on systems where we can query the
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}.

11 years agoAdd group_source setting in sudo.conf to allow the admin to specify
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).

11 years agoPass back exec_background to front end if it is enabled in sudoers.
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.

11 years agoMention that exec_background is for 1.8.7 and higher only.
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.

11 years agoAdd missing test files.
Todd C. Miller [Thu, 24 Jan 2013 17:05:33 +0000 (12:05 -0500)]
Add missing test files.

11 years agoAdd regress test for bug 361
Todd C. Miller [Thu, 24 Jan 2013 16:57:38 +0000 (11:57 -0500)]
Add regress test for bug 361

11 years agoAdd __dso_public to extern declaration of declaration to match
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.

11 years agoAdd 1.8.6p5
Todd C. Miller [Thu, 24 Jan 2013 12:44:10 +0000 (07:44 -0500)]
Add 1.8.6p5

11 years agoAdd test for visudo cycle check core dump; test case from Daniel Kopecek
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

11 years agoFix potential stack overflow due to infinite recursion in alias
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.

11 years agoIgnore duplicate entries in sudo.conf and report the line number
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.

11 years agoUse strtoul() not atoi().
Todd C. Miller [Wed, 23 Jan 2013 11:21:45 +0000 (06:21 -0500)]
Use strtoul() not atoi().

11 years agoregen depends for to add compat/nss_dbdefs.h for getgrouplist.lo
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

11 years agoFix typo that breaks the build on HP-UX.
Todd C. Miller [Tue, 22 Jan 2013 20:48:16 +0000 (15:48 -0500)]
Fix typo that breaks the build on HP-UX.

11 years agoUse nss_search() to implement getgrouplist() where available. Tested
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.

11 years agoRemove extra flag to sudo_sigaction(). We want to trap the signal
Todd C. Miller [Sat, 19 Jan 2013 20:10:01 +0000 (15:10 -0500)]
Remove extra flag to sudo_sigaction().  We want to trap the signal
regardless of whether or not it is ignored by the underlying command
since there's no way to know what signal handlers the command will
install.  Now we just use sudo_sigaction() to set a flag in
saved_signals[] to indicate whether a signal needs to be restored
before exec.

11 years agoUse _getgroupsbymember() on Solaris to get the groups list. Fixes
Todd C. Miller [Fri, 18 Jan 2013 19:58:12 +0000 (14:58 -0500)]
Use _getgroupsbymember() on Solaris to get the groups list.  Fixes
performance problems with the getgroupslist() compat on Solaris
systems with network-based group databases.

11 years agoDocument signal handler behavior in plugin API 1.3
Todd C. Miller [Thu, 17 Jan 2013 20:13:32 +0000 (15:13 -0500)]
Document signal handler behavior in plugin API 1.3

11 years agoMove signal code into its own source file and add sudo_sigaction()
Todd C. Miller [Thu, 17 Jan 2013 18:29:46 +0000 (13:29 -0500)]
Move signal code into its own source file and add sudo_sigaction()
wrapper that has an extra flag to check the saved_signals list to
only install the handler if the signal is not already ignored.
Bump plugin API version for the new front-end signal behavior.