]> granicus.if.org Git - sudo/log
sudo
11 years agoMove sudo_conv into policy.c
Todd C. Miller [Wed, 27 Mar 2013 17:42:40 +0000 (13:42 -0400)]
Move sudo_conv into policy.c

11 years agocosmetic fixes
Todd C. Miller [Wed, 27 Mar 2013 15:29:58 +0000 (11:29 -0400)]
cosmetic fixes

11 years agoRHEL (and perhaps other Linux distros) use the string "(none)"
Todd C. Miller [Wed, 27 Mar 2013 07:41:00 +0000 (03:41 -0400)]
RHEL (and perhaps other Linux distros) use the string "(none)"
instead of an empty string when there is no actual NIS-style domain
name.  Bug #596

11 years agoFix return values when NAME_MATCH is defined.
Todd C. Miller [Wed, 27 Mar 2013 07:39:18 +0000 (03:39 -0400)]
Fix return values when NAME_MATCH is defined.

11 years agoUpdate copyright year.
Todd C. Miller [Tue, 26 Mar 2013 17:29:05 +0000 (13:29 -0400)]
Update copyright year.

11 years agoAdd sudo_set_grlist(), currently unused by the back end.
Todd C. Miller [Tue, 26 Mar 2013 17:27:51 +0000 (13:27 -0400)]
Add sudo_set_grlist(), currently unused by the back end.

11 years agoRemove unused macros, fix a debug_decl
Todd C. Miller [Tue, 26 Mar 2013 17:26:59 +0000 (13:26 -0400)]
Remove unused macros, fix a debug_decl

11 years agoTru64 Unix doesn't prototype innetgr() or getdomainname().
Todd C. Miller [Tue, 26 Mar 2013 17:19:59 +0000 (13:19 -0400)]
Tru64 Unix doesn't prototype innetgr() or getdomainname().

11 years agoWhitespace fixes
Todd C. Miller [Tue, 26 Mar 2013 14:27:06 +0000 (10:27 -0400)]
Whitespace fixes

11 years agoDon't need to include setjmp.h here, error.h already includes it.
Todd C. Miller [Tue, 26 Mar 2013 12:56:56 +0000 (08:56 -0400)]
Don't need to include setjmp.h here, error.h already includes it.

11 years agoregen depends
Todd C. Miller [Mon, 25 Mar 2013 17:54:25 +0000 (13:54 -0400)]
regen depends

11 years agoRename guard define.
Todd C. Miller [Mon, 25 Mar 2013 15:30:16 +0000 (11:30 -0400)]
Rename guard define.

11 years agoMove contents of timestamp.h into check.h.
Todd C. Miller [Mon, 25 Mar 2013 15:28:21 +0000 (11:28 -0400)]
Move contents of timestamp.h into check.h.

11 years agoexpand_prompt() is now in prompt.c
Todd C. Miller [Mon, 25 Mar 2013 15:19:56 +0000 (11:19 -0400)]
expand_prompt() is now in prompt.c
sudo_printf extern is now in error.h

11 years agoChange multiple inclusion guards to be _SUDOERS_FOO_H
Todd C. Miller [Mon, 25 Mar 2013 15:17:46 +0000 (11:17 -0400)]
Change multiple inclusion guards to be _SUDOERS_FOO_H

11 years agoNew Dutch translation for sudo and sudoers
Todd C. Miller [Sat, 23 Mar 2013 12:45:51 +0000 (08:45 -0400)]
New Dutch translation for sudo and sudoers
New Turkish translation for sudo
From translationproject.org

11 years agoFix a typo in a comment and make sure we don't mistakenly include
Todd C. Miller [Thu, 21 Mar 2013 20:35:18 +0000 (16:35 -0400)]
Fix a typo in a comment and make sure we don't mistakenly include
_PATH_SUDO_ASKPASS and _PATH_SUDO_SESH in config.h.in

11 years agoDon't build check_symbols if we are linking sudoers in statically.
Todd C. Miller [Tue, 19 Mar 2013 20:18:04 +0000 (16:18 -0400)]
Don't build check_symbols if we are linking sudoers in statically.

11 years agoUse $host_os not $host when we only care about the os name and version.
Todd C. Miller [Tue, 19 Mar 2013 19:59:23 +0000 (15:59 -0400)]
Use $host_os not $host when we only care about the os name and version.

11 years agoSuppress duplicate -L and -I flags.
Todd C. Miller [Tue, 19 Mar 2013 18:10:26 +0000 (14:10 -0400)]
Suppress duplicate -L and -I flags.

11 years agoFix regress tests on non-OpenBSD platforms.
Todd C. Miller [Tue, 19 Mar 2013 18:08:11 +0000 (14:08 -0400)]
Fix regress tests on non-OpenBSD platforms.

11 years agoIf we find sasl/sasl.h there's no need to check for sasl.h too
Todd C. Miller [Tue, 19 Mar 2013 17:04:24 +0000 (13:04 -0400)]
If we find sasl/sasl.h there's no need to check for sasl.h too

11 years agoAdd -R flags at the very end after configure link tests are done
Todd C. Miller [Tue, 19 Mar 2013 15:52:54 +0000 (11:52 -0400)]
Add -R flags at the very end after configure link tests are done
since we can only count on libtool to accept -R, the compiler front
end may not.
Also unify the libldap and libibmldap tests using AC_SEARCH_LIBS
and check for -lCsup on HP-UX which is needed by libibmldap (but
is not an explicit dependency).

11 years agoBack out changes that broke detection of skey, opie and ldap
Todd C. Miller [Mon, 18 Mar 2013 20:34:01 +0000 (16:34 -0400)]
Back out changes that broke detection of skey, opie and ldap
libraries.

11 years agoAdd explicit "exit 0" to prevent the check target from ending
Todd C. Miller [Mon, 18 Mar 2013 20:11:24 +0000 (16:11 -0400)]
Add explicit "exit 0" to prevent the check target from ending
prematurely.

11 years agoFix exit values in check target so we don't have to ignore errors.
Todd C. Miller [Mon, 18 Mar 2013 20:10:08 +0000 (16:10 -0400)]
Fix exit values in check target so we don't have to ignore errors.

11 years agoFail a test if there is unexpected stderr output.
Todd C. Miller [Mon, 18 Mar 2013 19:31:04 +0000 (15:31 -0400)]
Fail a test if there is unexpected stderr output.

11 years agoFix path to sudo.conf manuals; remove non-existant test2.err.ok
Todd C. Miller [Mon, 18 Mar 2013 19:29:40 +0000 (15:29 -0400)]
Fix path to sudo.conf manuals; remove non-existant test2.err.ok

11 years agoFix compilation in dynamic mode.
Todd C. Miller [Mon, 18 Mar 2013 19:26:08 +0000 (15:26 -0400)]
Fix compilation in dynamic mode.

11 years agoOn HP-UX, libibmldap has a hidden dependency on libCsup
Todd C. Miller [Mon, 18 Mar 2013 19:19:12 +0000 (15:19 -0400)]
On HP-UX, libibmldap has a hidden dependency on libCsup

11 years agoPass BIND_VERBOSE to shl_load()
Todd C. Miller [Mon, 18 Mar 2013 19:15:13 +0000 (15:15 -0400)]
Pass BIND_VERBOSE to shl_load()

11 years agoOnly create static helper libs when --disable-shared is specified.
Todd C. Miller [Mon, 18 Mar 2013 14:15:48 +0000 (10:15 -0400)]
Only create static helper libs when --disable-shared is specified.

11 years agoUbreak static build.
Todd C. Miller [Mon, 18 Mar 2013 13:55:01 +0000 (09:55 -0400)]
Ubreak static build.

11 years agoReplace --with-rpath and --with-blibpath with --disable-rpath.
Todd C. Miller [Mon, 18 Mar 2013 13:27:07 +0000 (09:27 -0400)]
Replace --with-rpath and --with-blibpath with --disable-rpath.
Now that we use libtool for linking we can just use the -R
flag and have libtool translate it to the proper linker flag.

11 years agoBump I/O buffer size 32K
Todd C. Miller [Fri, 15 Mar 2013 15:31:58 +0000 (11:31 -0400)]
Bump I/O buffer size 32K

11 years agoDocument sesh Path setting.
Todd C. Miller [Fri, 15 Mar 2013 00:13:54 +0000 (20:13 -0400)]
Document sesh Path setting.

11 years agoMove exec_cmnd to exec.c to fix a compilation issue with sesh.c
Todd C. Miller [Thu, 14 Mar 2013 23:59:07 +0000 (19:59 -0400)]
Move exec_cmnd to exec.c to fix a compilation issue with sesh.c

11 years agoMake sesh path configurable in sudo.conf
Todd C. Miller [Thu, 14 Mar 2013 20:49:42 +0000 (16:49 -0400)]
Make sesh path configurable in sudo.conf

11 years agoUse -fno-pie and -nopie if supported when --disable-pie is specified.
Todd C. Miller [Thu, 14 Mar 2013 20:06:13 +0000 (16:06 -0400)]
Use -fno-pie and -nopie if supported when --disable-pie is specified.

11 years agoDocument direct execution of the command if the policy plugin has
Todd C. Miller [Wed, 13 Mar 2013 15:32:31 +0000 (11:32 -0400)]
Document direct execution of the command if the policy plugin has
no close function.

11 years agoOnly delete creds if we actually established them.
Todd C. Miller [Thu, 7 Mar 2013 21:17:44 +0000 (16:17 -0500)]
Only delete creds if we actually established them.
Print an error if pam_setcred() fails and we actually authenticated.

11 years agoregen
Todd C. Miller [Thu, 7 Mar 2013 20:46:11 +0000 (15:46 -0500)]
regen

11 years agoConvert efree() to a macro that just casts to void * and does free().
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.

11 years agoDefine _REENTRANT for HP-UX when we add -lpthread to SUDO_LIBS.
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.

11 years agoFix debug logging from the plugin when there is no error number.
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.

11 years agoAlways install plugins with a .so extension regardless of what
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.

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.