]> granicus.if.org Git - sudo/log
sudo
12 years agoRemove the NO_EXIT flag to log_error() and add a log_fatal() function
Todd C. Miller [Mon, 26 Mar 2012 14:59:14 +0000 (10:59 -0400)]
Remove the NO_EXIT flag to log_error() and add a log_fatal() function
that exits and is marked no_return.  Fixes false positives from
static analyzers and is easier for humans to read too.

12 years agosync with translationproject.org
Todd C. Miller [Sat, 24 Mar 2012 17:38:38 +0000 (13:38 -0400)]
sync with translationproject.org

12 years agosync with translationproject.org
Todd C. Miller [Tue, 20 Mar 2012 18:38:30 +0000 (14:38 -0400)]
sync with translationproject.org

12 years agosync with translationproject.org
Todd C. Miller [Tue, 20 Mar 2012 18:08:58 +0000 (14:08 -0400)]
sync with translationproject.org

12 years agosync with translationproject.org
Todd C. Miller [Mon, 19 Mar 2012 15:25:07 +0000 (11:25 -0400)]
sync with translationproject.org

12 years agoUse ecalloc() when allocating structs.
Todd C. Miller [Mon, 19 Mar 2012 15:24:24 +0000 (11:24 -0400)]
Use ecalloc() when allocating structs.

12 years agoAdd ecalloc() and commented out recalloc().
Todd C. Miller [Mon, 19 Mar 2012 15:23:25 +0000 (11:23 -0400)]
Add ecalloc() and commented out recalloc().
Use inline strnlen() instead of strlen() in estrndup().

12 years agosync with translationproject.org
Todd C. Miller [Sun, 18 Mar 2012 16:47:27 +0000 (12:47 -0400)]
sync with translationproject.org

12 years agoRemove unused label
Todd C. Miller [Sat, 17 Mar 2012 00:13:43 +0000 (20:13 -0400)]
Remove unused label

12 years agoDocument what changed in each plugin API revision
Todd C. Miller [Fri, 16 Mar 2012 18:39:12 +0000 (14:39 -0400)]
Document what changed in each plugin API revision

12 years agoRemove bogus optimization that could lead to a double free of the
Todd C. Miller [Fri, 16 Mar 2012 16:00:32 +0000 (12:00 -0400)]
Remove bogus optimization that could lead to a double free of the
group list.

12 years agoExpand AIX /etc/security/privcmds entry.
Todd C. Miller [Thu, 15 Mar 2012 19:25:13 +0000 (15:25 -0400)]
Expand AIX /etc/security/privcmds entry.

12 years agoUpdate for sudo 1.8.5
Todd C. Miller [Thu, 15 Mar 2012 16:32:56 +0000 (12:32 -0400)]
Update for sudo 1.8.5

12 years agoRename plugin "args" to "options"
Todd C. Miller [Thu, 15 Mar 2012 16:32:31 +0000 (12:32 -0400)]
Rename plugin "args" to "options"

12 years agoAdd Lithuanian and Vietnamese translators
Todd C. Miller [Thu, 15 Mar 2012 16:21:36 +0000 (12:21 -0400)]
Add Lithuanian and Vietnamese translators

12 years agoIgnore comments when comparing new and old pot files.
Todd C. Miller [Thu, 15 Mar 2012 15:44:35 +0000 (11:44 -0400)]
Ignore comments when comparing new and old pot files.

12 years agoregen
Todd C. Miller [Thu, 15 Mar 2012 13:19:28 +0000 (09:19 -0400)]
regen

12 years agoregen
Todd C. Miller [Thu, 15 Mar 2012 13:18:50 +0000 (09:18 -0400)]
regen

12 years agoPass a pointer to user_env in to the init_session policy plugin
Todd C. Miller [Thu, 15 Mar 2012 13:18:36 +0000 (09:18 -0400)]
Pass a pointer to user_env in to the init_session policy plugin
function so session setup can modify the user environment as needed.
For PAM authentication, merge the PAM environment with the user
environment at init_session time.  We no longer need to swap in the
user_env for environ during session init, nor do we need to disable
the env hooks at init_session time.

12 years agoAdd explicit NULL entries for init_session, register_hooks and
Todd C. Miller [Thu, 15 Mar 2012 13:02:19 +0000 (09:02 -0400)]
Add explicit NULL entries for init_session, register_hooks and
deregister_hooks with appropriate comments.

12 years agoQuiet a gcc "used uninitialized in this function" false positive.
Todd C. Miller [Thu, 15 Mar 2012 12:56:12 +0000 (08:56 -0400)]
Quiet a gcc "used uninitialized in this function" false positive.

12 years agoWe should always call warning() with a format string or a string literal.
Todd C. Miller [Thu, 15 Mar 2012 12:47:23 +0000 (08:47 -0400)]
We should always call warning() with a format string or a string literal.
In this case, the argument (path) is not user-controlled.

12 years agoInclude sudo_exec.h for the sudo_execve() prototype.
Todd C. Miller [Thu, 15 Mar 2012 01:52:31 +0000 (21:52 -0400)]
Include sudo_exec.h for the sudo_execve() prototype.

12 years agoAdd check for pam_getenvlist()
Todd C. Miller [Thu, 15 Mar 2012 00:55:11 +0000 (20:55 -0400)]
Add check for pam_getenvlist()

12 years agoSet args to NULL in default plugin info struct when there is no
Todd C. Miller [Wed, 14 Mar 2012 19:07:50 +0000 (15:07 -0400)]
Set args to NULL in default plugin info struct when there is no
Plugin line in sudo.conf.

12 years agoregen
Todd C. Miller [Wed, 14 Mar 2012 18:20:55 +0000 (14:20 -0400)]
regen

12 years agoregen
Todd C. Miller [Wed, 14 Mar 2012 18:20:16 +0000 (14:20 -0400)]
regen

12 years agoBump version to 1.8.5
Todd C. Miller [Wed, 14 Mar 2012 18:17:44 +0000 (14:17 -0400)]
Bump version to 1.8.5

12 years agoDocument hooks API
Todd C. Miller [Wed, 14 Mar 2012 18:11:18 +0000 (14:11 -0400)]
Document hooks API

12 years agoMake sudoersdir relative to PKG_INSTALL_ROOT for Solaris.
Todd C. Miller [Tue, 13 Mar 2012 21:38:03 +0000 (17:38 -0400)]
Make sudoersdir relative to PKG_INSTALL_ROOT for Solaris.

12 years agoUse sudo_hook_fn_t in struct sudo_hook.
Todd C. Miller [Tue, 13 Mar 2012 21:32:50 +0000 (17:32 -0400)]
Use sudo_hook_fn_t in struct sudo_hook.

12 years agoIf cross compiling, --host must include the OS in the tuple.
Todd C. Miller [Tue, 13 Mar 2012 15:01:23 +0000 (11:01 -0400)]
If cross compiling, --host must include the OS in the tuple.
E.g. --host powerpc-unknown-linux

12 years agoFix bogus int -> bool conversion; tags can have a value of -1.
Todd C. Miller [Mon, 12 Mar 2012 23:34:19 +0000 (19:34 -0400)]
Fix bogus int -> bool conversion; tags can have a value of -1.

12 years agoAdd env_should_keep() and env_should_delete() wrapper functions to
Todd C. Miller [Mon, 12 Mar 2012 20:45:22 +0000 (16:45 -0400)]
Add env_should_keep() and env_should_delete() wrapper functions to
simplify things a bit and hide the fact that matches_env_check()
is not bool.

12 years agoFix application of debian-specific sudoers mods when building packages
Todd C. Miller [Mon, 12 Mar 2012 19:04:03 +0000 (15:04 -0400)]
Fix application of debian-specific sudoers mods when building packages
as non-root.

12 years agomatches_env_check() returns int, not boolean
Todd C. Miller [Mon, 12 Mar 2012 17:53:54 +0000 (13:53 -0400)]
matches_env_check() returns int, not boolean

12 years agoFix compilation when seteuid() is not available.
Todd C. Miller [Mon, 12 Mar 2012 17:52:51 +0000 (13:52 -0400)]
Fix compilation when seteuid() is not available.

12 years agoSimply move the free of ki_proc outside the realloc() loop.
Todd C. Miller [Mon, 12 Mar 2012 15:37:33 +0000 (11:37 -0400)]
Simply move the free of ki_proc outside the realloc() loop.

12 years agoBring back the erealloc() for the ENOMEM loop and just zero the
Todd C. Miller [Mon, 12 Mar 2012 14:49:26 +0000 (10:49 -0400)]
Bring back the erealloc() for the ENOMEM loop and just zero the
pointer after we free it.

12 years agoDon't try to erealloc() a potentially freed pointer; Mateusz Guzik
Todd C. Miller [Mon, 12 Mar 2012 12:54:40 +0000 (08:54 -0400)]
Don't try to erealloc() a potentially freed pointer; Mateusz Guzik

12 years agoUse normal error path if unable to set sudoers gid.
Todd C. Miller [Sat, 10 Mar 2012 21:38:14 +0000 (16:38 -0500)]
Use normal error path if unable to set sudoers gid.

12 years agoMake this work again on systems w/o seteuid().
Todd C. Miller [Sat, 10 Mar 2012 20:29:46 +0000 (15:29 -0500)]
Make this work again on systems w/o seteuid().

12 years agoFix compilation if no seteuid/setreuid/setresuid available.
Todd C. Miller [Fri, 9 Mar 2012 22:28:59 +0000 (17:28 -0500)]
Fix compilation if no seteuid/setreuid/setresuid available.

12 years agoBetter error messages, and added debugging throughout.
Todd C. Miller [Fri, 9 Mar 2012 22:07:41 +0000 (17:07 -0500)]
Better error messages, and added debugging throughout.
Fixed seteuid() version of set_perms()/restore_perms().
Fixed logic bug in AIX version of restore_perms().
Added checks to avoid changing uid/gid when we don't have to.
Never set gid/uid state to -1, use the old value instead.

12 years agoFix format string warning on Solaris with gcc 3.4.3.
Todd C. Miller [Fri, 9 Mar 2012 17:45:24 +0000 (12:45 -0500)]
Fix format string warning on Solaris with gcc 3.4.3.

12 years agoAlways declare environ now that we swap it around unilaterally.
Todd C. Miller [Fri, 9 Mar 2012 17:42:30 +0000 (12:42 -0500)]
Always declare environ now that we swap it around unilaterally.

12 years agoHonor LDFLAGS when linking sesh; from Vita Cizek
Todd C. Miller [Fri, 9 Mar 2012 15:07:00 +0000 (10:07 -0500)]
Honor LDFLAGS when linking sesh; from Vita Cizek

12 years agoInclude alloc.h for estrdup() prototype; from Vita Cizek
Todd C. Miller [Fri, 9 Mar 2012 15:06:27 +0000 (10:06 -0500)]
Include alloc.h for estrdup() prototype; from Vita Cizek

12 years agoDon't read /etc/environment on Linux when using PAM, PAM should set
Todd C. Miller [Thu, 8 Mar 2012 19:51:03 +0000 (14:51 -0500)]
Don't read /etc/environment on Linux when using PAM, PAM should set
the environment variables as needed via pam_env.

12 years agoFix editor goof.
Todd C. Miller [Thu, 8 Mar 2012 18:19:39 +0000 (13:19 -0500)]
Fix editor goof.

12 years agoDisable environment hooks after we get user_env back to make sure
Todd C. Miller [Thu, 8 Mar 2012 16:30:21 +0000 (11:30 -0500)]
Disable environment hooks after we get user_env back to make sure
a plugin can't to modify user_env after we "own" it.  This is kind
of a hack but we don't want the init_session plugin function to
modify user_env.

12 years agoAdd support for deregistering hooks. If an I/O log plugin fails
Todd C. Miller [Thu, 8 Mar 2012 16:29:32 +0000 (11:29 -0500)]
Add support for deregistering hooks.  If an I/O log plugin fails
to initialize, deregister its hooks (if any).

12 years agoMove LOGIN_PATH and LOGIN_SETENV handling to plugin now that we
Todd C. Miller [Wed, 7 Mar 2012 21:38:57 +0000 (16:38 -0500)]
Move LOGIN_PATH and LOGIN_SETENV handling to plugin now that we
hook setenv.

12 years agoInitial cut at a hooks implementation. The plugin can register
Todd C. Miller [Wed, 7 Mar 2012 21:35:42 +0000 (16:35 -0500)]
Initial cut at a hooks implementation.  The plugin can register
hooks for getenv, putenv, setenv and unsetenv.  This makes it
possible for the plugin to trap changes to the environment made by
authentication methods such as PAM or BSD auth so that such changes
are reflected in the environment passed back to sudo for execve().

12 years agoAdd Vietnamese sudo translation from translationproject.org
Todd C. Miller [Mon, 5 Mar 2012 14:42:52 +0000 (09:42 -0500)]
Add Vietnamese sudo translation from translationproject.org

12 years agoList sudo_noexec.so not noexec.so in the sample sudo.conf
Todd C. Miller [Fri, 2 Mar 2012 16:15:40 +0000 (11:15 -0500)]
List sudo_noexec.so not noexec.so in the sample sudo.conf

12 years agoAdd support for plugin args at the end of a Plugin line in sudo.conf.
Todd C. Miller [Fri, 2 Mar 2012 16:04:09 +0000 (11:04 -0500)]
Add support for plugin args at the end of a Plugin line in sudo.conf.
Bump the minor number accordingly and update the documentation.  A
plugin must check the sudo front end's version before using the
plugin_args parameter since it is only supported for API version
1.2 and higher.

12 years agoupdate depends
Todd C. Miller [Thu, 1 Mar 2012 18:19:30 +0000 (13:19 -0500)]
update depends

12 years agosecure_path.c is in common, not compat
Todd C. Miller [Thu, 1 Mar 2012 18:05:43 +0000 (13:05 -0500)]
secure_path.c is in common, not compat

12 years agoAdd check for variadic macro support in cpp.
Todd C. Miller [Thu, 1 Mar 2012 18:05:03 +0000 (13:05 -0500)]
Add check for variadic macro support in cpp.

12 years agoAdd type param to sudo_secure_path() and add sudo_secure_file()
Todd C. Miller [Wed, 29 Feb 2012 20:50:48 +0000 (15:50 -0500)]
Add type param to sudo_secure_path() and add sudo_secure_file()
and sudo_secure_dir() wrappers which get by #includedir in sudoers.

12 years agoCheck the owner and mode in -c (check) mode unless the -f option
Todd C. Miller [Tue, 28 Feb 2012 19:16:39 +0000 (14:16 -0500)]
Check the owner and mode in -c (check) mode unless the -f option
is specified.  Previously, the owner and mode were checked on the
main sudoers file when the -s (strict) option was given, but this
was not documented.

12 years agoPrefer KERN_PROC2 over KERN_PROC. Fixes compilation on some versions
Todd C. Miller [Tue, 28 Feb 2012 15:33:16 +0000 (10:33 -0500)]
Prefer KERN_PROC2 over KERN_PROC.  Fixes compilation on some versions
of OpenBSD versions that have KERN_PROC2 but not KERN_PROC.

12 years agoAdd Eric Lakin for patch in bug #538
Todd C. Miller [Mon, 27 Feb 2012 21:39:27 +0000 (16:39 -0500)]
Add Eric Lakin for patch in bug #538

12 years agoFix typo in safe_close() made while converting to debug framework
Todd C. Miller [Mon, 27 Feb 2012 19:46:11 +0000 (14:46 -0500)]
Fix typo in safe_close() made while converting to debug framework
that prevented it from actually closing anything.

12 years agoAdd some more debugging.
Todd C. Miller [Mon, 27 Feb 2012 19:42:22 +0000 (14:42 -0500)]
Add some more debugging.

12 years agoWe need sysconfdir in compat/Makfile to get the proper sudo.conf
Todd C. Miller [Mon, 27 Feb 2012 18:28:15 +0000 (13:28 -0500)]
We need sysconfdir in compat/Makfile to get the proper sudo.conf
path.  Add standard prefix and foodir expansion in all Makefiles
to avoid this problem in the future.

12 years agoNew Lithuanian sudoers translation from translationproject.org
Todd C. Miller [Sat, 25 Feb 2012 18:42:26 +0000 (13:42 -0500)]
New Lithuanian sudoers translation from translationproject.org

12 years agoUpdate from translationproject.org
Todd C. Miller [Sat, 25 Feb 2012 18:40:32 +0000 (13:40 -0500)]
Update from translationproject.org

12 years agoWhen adding gids to the LDAP filter, only add the primary gid once.
Todd C. Miller [Fri, 24 Feb 2012 20:17:48 +0000 (15:17 -0500)]
When adding gids to the LDAP filter, only add the primary gid once.
This is consistent with the space computation/allocation.
From Eric Lakin

12 years agoAdd entry for AIX enhanced RBAC config.
Todd C. Miller [Fri, 24 Feb 2012 19:32:57 +0000 (14:32 -0500)]
Add entry for AIX enhanced RBAC config.

12 years agoTarget Mac OS X 10.5 when building packages.
Todd C. Miller [Fri, 24 Feb 2012 18:40:39 +0000 (13:40 -0500)]
Target Mac OS X 10.5 when building packages.

12 years agoRelax the user/group/mode checks on sudoers files. As long as the
Todd C. Miller [Wed, 22 Feb 2012 18:04:03 +0000 (13:04 -0500)]
Relax the user/group/mode checks on sudoers files.  As long as the
file is owned by the right user, not world-writable and not writable
by a group other than the one specified at configure time (gid 0
by default), the file is considered OK.  Note that visudo will still
set the mode to the value specified at configure time.

12 years agoAdd AIX-specific version of permission setting code to make sure
Todd C. Miller [Tue, 21 Feb 2012 21:07:28 +0000 (16:07 -0500)]
Add AIX-specific version of permission setting code to make sure
that the saved uid gets restored properly.

12 years agoCheck for LD_PRELOAD variants in configure instead of checkign cpp
Todd C. Miller [Tue, 21 Feb 2012 18:26:02 +0000 (13:26 -0500)]
Check for LD_PRELOAD variants in configure instead of checkign cpp
symbols.  In disable_execute(), compute the length of the new envp
and allocate it once instead of reallocating on demand.  Also append
old value of LD_PRELOAD (if any) to the new value.

12 years agoFix the description of noexec.
Todd C. Miller [Tue, 21 Feb 2012 10:15:48 +0000 (05:15 -0500)]
Fix the description of noexec.

12 years agoThe "op" parameter to set_default() must be int, not bool since it is
Todd C. Miller [Tue, 21 Feb 2012 10:13:13 +0000 (05:13 -0500)]
The "op" parameter to set_default() must be int, not bool since it is
set to '+' or '-' for list add and subtract.

12 years agoMake sure sudoers is writable before calling ed script.
Todd C. Miller [Tue, 21 Feb 2012 09:54:08 +0000 (04:54 -0500)]
Make sure sudoers is writable before calling ed script.

12 years agoUpdate contributors. Now includes translators and authors of compat
Todd C. Miller [Fri, 17 Feb 2012 16:30:42 +0000 (11:30 -0500)]
Update contributors. Now includes translators and authors of compat
code.

12 years agoregen
Todd C. Miller [Thu, 16 Feb 2012 22:03:46 +0000 (17:03 -0500)]
regen

12 years agoBuild flat packages, not package bundles, on Mac OS X.
Todd C. Miller [Thu, 16 Feb 2012 16:27:22 +0000 (11:27 -0500)]
Build flat packages, not package bundles, on Mac OS X.

12 years agoMove macos section to be with the other OS-specific sections.
Todd C. Miller [Fri, 10 Feb 2012 21:22:21 +0000 (16:22 -0500)]
Move macos section to be with the other OS-specific sections.

12 years agoSync with translationproject.org
Todd C. Miller [Fri, 10 Feb 2012 19:30:01 +0000 (14:30 -0500)]
Sync with translationproject.org

12 years agoDon't permanently add -D_FORTIFY_SOURCE=2 to CPPFLAGS
Todd C. Miller [Fri, 10 Feb 2012 19:28:10 +0000 (14:28 -0500)]
Don't permanently add -D_FORTIFY_SOURCE=2 to CPPFLAGS

12 years agoAdd Mac OS X support, printing the latest chunk of the NEWS file
Todd C. Miller [Fri, 10 Feb 2012 17:50:15 +0000 (12:50 -0500)]
Add Mac OS X support, printing the latest chunk of the NEWS file
and the license text in the installer.

12 years agoAdd explicit file modes that match those used by "make install"
Todd C. Miller [Fri, 10 Feb 2012 17:35:41 +0000 (12:35 -0500)]
Add explicit file modes that match those used by "make install"

12 years agoSync with upstream for Mac OS X fixes.
Todd C. Miller [Fri, 10 Feb 2012 16:34:08 +0000 (11:34 -0500)]
Sync with upstream for Mac OS X fixes.

12 years agoGot back to using "install-sh -M" for files installed as non-readable
Todd C. Miller [Fri, 10 Feb 2012 16:31:54 +0000 (11:31 -0500)]
Got back to using "install-sh -M" for files installed as non-readable
by owner.  This fixes "make install" as non-root for package building.

12 years agoSync with translationproject.org
Todd C. Miller [Thu, 9 Feb 2012 16:17:35 +0000 (11:17 -0500)]
Sync with translationproject.org

12 years agoUse -m not -M for install-sh for everything except setuid.
Todd C. Miller [Thu, 9 Feb 2012 16:11:58 +0000 (11:11 -0500)]
Use -m not -M for install-sh for everything except setuid.
Install locale .mo files mode 0444, not 0644.
If timedir parent doesn't exist, use default dir mode, not 0700.

12 years agoRe-sync with upstream; no longer need a local patch.
Todd C. Miller [Tue, 7 Feb 2012 18:26:27 +0000 (13:26 -0500)]
Re-sync with upstream; no longer need a local patch.

12 years agoAdd support for building Mac OS X packages.
Todd C. Miller [Tue, 7 Feb 2012 16:49:46 +0000 (11:49 -0500)]
Add support for building Mac OS X packages.

12 years agoSync with upstream
Todd C. Miller [Tue, 7 Feb 2012 16:45:42 +0000 (11:45 -0500)]
Sync with upstream

12 years agoNo longer need to define _PATH_SUDO_CONF here.
Todd C. Miller [Tue, 7 Feb 2012 16:45:11 +0000 (11:45 -0500)]
No longer need to define _PATH_SUDO_CONF here.

12 years agoFix noexec for Mac OS X.
Todd C. Miller [Tue, 7 Feb 2012 05:18:08 +0000 (00:18 -0500)]
Fix noexec for Mac OS X.

12 years agoMove _PATH_SUDO_CONF override to common to match sudo_debug.c
Todd C. Miller [Mon, 6 Feb 2012 20:57:26 +0000 (15:57 -0500)]
Move _PATH_SUDO_CONF override to common to match sudo_debug.c

12 years agoMore complete fix for LDR_PRELOAD on AIX. The addition of
Todd C. Miller [Mon, 6 Feb 2012 20:46:17 +0000 (15:46 -0500)]
More complete fix for LDR_PRELOAD on AIX.  The addition of
set_perm(PERM_ROOT) before calling the nss open functions (needed
to avoid a GNU TLS bug) also broke LDR_PRELOAD.  Setting the effective
and then real uid to 0 for PERM_ROOT works around the issue.

12 years agoregen
Todd C. Miller [Mon, 6 Feb 2012 18:40:24 +0000 (13:40 -0500)]
regen

12 years agoSet real uid to root before calling sudo_edit() or run_command()
Todd C. Miller [Mon, 6 Feb 2012 18:33:46 +0000 (13:33 -0500)]
Set real uid to root before calling sudo_edit() or run_command()
so that the monitor process is owned by root and not by the user.
Otherwise, on AIX at least, the monitor process shows up in ps as
belonging to the user (and can be killed by the user).

12 years agoFor PERM_ROOT when using setreuid(), only set the euid to 0 prior
Todd C. Miller [Mon, 6 Feb 2012 18:29:19 +0000 (13:29 -0500)]
For PERM_ROOT when using setreuid(), only set the euid to 0 prior
to the call to setuid(0) if the current euid is non-zero.  This
effectively restores the state of things prior to rev 7bfeb629fccb.
Fixes a problem on AIX where LDR_PRELOAD was not being honored for
the command being executed.