]> granicus.if.org Git - sudo/log
sudo
13 years agoDon't try to audit failure if the runas user does not exist. We don't
Todd C. Miller [Wed, 27 Jul 2011 16:11:33 +0000 (12:11 -0400)]
Don't try to audit failure if the runas user does not exist.  We don't
have the user's command at this point so there is nothing to audit.
Add a NULL check in audit_success() and audit_failure() just to be
on the safe side.

13 years agoAdd -g to CFLAG for PIE builds.
Todd C. Miller [Wed, 27 Jul 2011 16:00:24 +0000 (12:00 -0400)]
Add -g to CFLAG for PIE builds.

13 years agoRemove fallback to per-group lookup when matching groups in sudoers.
Todd C. Miller [Mon, 25 Jul 2011 13:17:18 +0000 (09:17 -0400)]
Remove fallback to per-group lookup when matching groups in sudoers.
The sudo front-end will now use getgrouplist() to get the user's
list of groups if getgroups() fails or returns zero groups so we
always have a list of the user's groups.  For systems with
mbr_check_membership() which support more that NGROUPS_MAX groups
(Mac OS X), skip the call to getgroups() and use getgrouplist() so
we get all the groups.

13 years agoFix setgroups() fallback code on EINVAL.
Todd C. Miller [Fri, 22 Jul 2011 19:33:33 +0000 (15:33 -0400)]
Fix setgroups() fallback code on EINVAL.

13 years agoFix two PERM_INITIAL cases that were still using user_gids.
Todd C. Miller [Fri, 22 Jul 2011 19:13:35 +0000 (15:13 -0400)]
Fix two PERM_INITIAL cases that were still using user_gids.

13 years agoAdd Polish sudo message catalog
Todd C. Miller [Fri, 22 Jul 2011 16:56:33 +0000 (12:56 -0400)]
Add Polish sudo message catalog

13 years agouser_group is no longer used, remove it
Todd C. Miller [Fri, 22 Jul 2011 13:29:49 +0000 (09:29 -0400)]
user_group is no longer used, remove it

13 years agoAdd Polish translation from translationproject.org
Todd C. Miller [Wed, 20 Jul 2011 20:55:57 +0000 (16:55 -0400)]
Add Polish translation from translationproject.org

13 years agoAdd a wrapper for setgroups() that trims off extra groups and retries
Todd C. Miller [Wed, 20 Jul 2011 20:54:12 +0000 (16:54 -0400)]
Add a wrapper for setgroups() that trims off extra groups and retries
if setgroups() fails.  Also add some missing addrefs for PERM_USER
and PERM_FULL_USER.

13 years agoInstead of keeping separate groups and gids arrays, create struct
Todd C. Miller [Wed, 20 Jul 2011 15:58:45 +0000 (11:58 -0400)]
Instead of keeping separate groups and gids arrays, create struct
group_info and use it to store both, along with a count for each.
Cache group info on a per-user basis using getgrouplist() to get
the groups.  We no longer need special to special case the user or
list user for user_in_group() and thus no longer need to reset the
groups list when listing another user.

13 years agoDon't rely on NULL since we don't include a header for it.
Todd C. Miller [Wed, 20 Jul 2011 14:15:59 +0000 (10:15 -0400)]
Don't rely on NULL since we don't include a header for it.

13 years agoFix typo
Todd C. Miller [Tue, 19 Jul 2011 16:31:53 +0000 (12:31 -0400)]
Fix typo

13 years agoDo not shadow global sudo_mode with a local variable in set_cmnd()
Todd C. Miller [Mon, 18 Jul 2011 20:23:38 +0000 (16:23 -0400)]
Do not shadow global sudo_mode with a local variable in set_cmnd()

13 years agobash 2.x doesd not support the -l flag and exits with an error if
Todd C. Miller [Sun, 17 Jul 2011 14:37:15 +0000 (10:37 -0400)]
bash 2.x doesd not support the -l flag and exits with an error if
it is specified so use --login instead.  This causes an error with
bash 1.x (which uses -login instead) but this version is hopefully
less used than 2.x.

13 years agoAdd Polish translation from translationproject.org
Todd C. Miller [Sun, 17 Jul 2011 14:12:10 +0000 (10:12 -0400)]
Add Polish translation from translationproject.org

13 years agoMake error strings translatable.
Todd C. Miller [Wed, 13 Jul 2011 20:50:25 +0000 (16:50 -0400)]
Make error strings translatable.

13 years agoOnly run configure with --with-pam-login for RHEL 5 and above.
Todd C. Miller [Wed, 13 Jul 2011 19:51:26 +0000 (15:51 -0400)]
Only run configure with --with-pam-login for RHEL 5 and above.

13 years agoFix typo in summary
Todd C. Miller [Wed, 13 Jul 2011 15:41:26 +0000 (11:41 -0400)]
Fix typo in summary

13 years agoAdd missing logwrap.c
Todd C. Miller [Mon, 11 Jul 2011 19:57:13 +0000 (15:57 -0400)]
Add missing logwrap.c

13 years agoSplit out log file word wrap code into its own file and add unit
Todd C. Miller [Mon, 11 Jul 2011 19:22:25 +0000 (15:22 -0400)]
Split out log file word wrap code into its own file and add unit
tests.  Fixes an off-by one in the word wrap when the log line
length matches loglinelen.

13 years agoFor SuSE, only use /usr/lib64 as libexec if generating 64-bit
Todd C. Miller [Tue, 5 Jul 2011 16:42:55 +0000 (12:42 -0400)]
For SuSE, only use /usr/lib64 as libexec if generating 64-bit
binaries.

13 years agoFix build error when --without-noexec configure option is used.
Todd C. Miller [Tue, 5 Jul 2011 16:20:10 +0000 (12:20 -0400)]
Fix build error when --without-noexec configure option is used.

13 years agoDisable noexec for AIX < 5. LDR_PRELOAD is only available in AIX
Todd C. Miller [Tue, 5 Jul 2011 15:42:39 +0000 (11:42 -0400)]
Disable noexec for AIX < 5.  LDR_PRELOAD is only available in AIX
5.3 and above.

13 years agoResolve the list of gids passed in from the sudo frontend (the
Todd C. Miller [Fri, 1 Jul 2011 18:13:47 +0000 (14:13 -0400)]
Resolve the list of gids passed in from the sudo frontend (the
result of getgroups()) to names and store both the group names and
ids in the sudo_user struct.  When matching groups in the sudoers
file, match based on the names in the groups list first and
only do a gid-based match when we absolutely have to.  By matching
on the group name (as it is listed in sudoers) instead of id
(which we would have to resolve) we save a lot of group lookups
for sudoers files with a lot of groups in them.

13 years agoWorkaround for "sudo -i command" and newer versions of bash which
Todd C. Miller [Sun, 26 Jun 2011 22:02:09 +0000 (18:02 -0400)]
Workaround for "sudo -i command" and newer versions of bash which
don't go into login mode when -c is specified unless -l is too.

13 years agoRewrite logfile word wrapping code to be more straight-forward
Todd C. Miller [Thu, 23 Jun 2011 18:17:38 +0000 (14:17 -0400)]
Rewrite logfile word wrapping code to be more straight-forward
and actually wrap at the correct place.

13 years agoSet use_pty=true in command details when use_pty is set in sudoers.
Todd C. Miller [Wed, 22 Jun 2011 14:06:35 +0000 (10:06 -0400)]
Set use_pty=true in command details when use_pty is set in sudoers.
From Ludwig Nussel

13 years agoSync Chinese (simplified) PO files from translationproject.org
Todd C. Miller [Mon, 20 Jun 2011 12:30:10 +0000 (08:30 -0400)]
Sync Chinese (simplified) PO files from translationproject.org

13 years agoAdd Danish translation from translationproject.org and add missing
Todd C. Miller [Sat, 18 Jun 2011 17:21:48 +0000 (13:21 -0400)]
Add Danish translation from translationproject.org and add missing
Basque mo files.

13 years agoNo longer need to specify LINGUAS in configure, "make install-nls"
Todd C. Miller [Sat, 18 Jun 2011 17:11:27 +0000 (13:11 -0400)]
No longer need to specify LINGUAS in configure, "make install-nls"
now just installs all the .mo files it finds.

13 years agoBuild CONTRIBUTORS from newly-added contributors.pod
Todd C. Miller [Fri, 17 Jun 2011 13:39:27 +0000 (09:39 -0400)]
Build CONTRIBUTORS from newly-added contributors.pod

13 years agoRework the wording in the leading paragraph
Todd C. Miller [Fri, 17 Jun 2011 13:07:49 +0000 (09:07 -0400)]
Rework the wording in the leading paragraph

13 years agoAdd a CONTRIBUTORS file with the names of folks who have contributed
Todd C. Miller [Tue, 14 Jun 2011 20:53:26 +0000 (16:53 -0400)]
Add a CONTRIBUTORS file with the names of folks who have contributed
code or patches to sudo since I started maintaining it (plus the
original authors).

13 years agoPreserve SHELL variable for "sudo -s". Otherwise we can end up
Todd C. Miller [Mon, 13 Jun 2011 11:20:28 +0000 (07:20 -0400)]
Preserve SHELL variable for "sudo -s".  Otherwise we can end up
with a situation where the SHELL variable and the actual shell being
run do not match.

13 years agoOnly enable Solaris project support when setproject() is present in
Todd C. Miller [Fri, 10 Jun 2011 19:28:58 +0000 (15:28 -0400)]
Only enable Solaris project support when setproject() is present in
libproject.

13 years agoExplicitly set mode and owner of /etc/sudoers instead of relying
Todd C. Miller [Fri, 10 Jun 2011 19:26:35 +0000 (15:26 -0400)]
Explicitly set mode and owner of /etc/sudoers instead of relying
on "cp -p" to work in the postinstall script.  On AIX 6.1 at least
the postinstall script runs before the final file permissions are set.

13 years agoRefer the user to the "Command Environment" section in description
Todd C. Miller [Thu, 9 Jun 2011 16:52:51 +0000 (12:52 -0400)]
Refer the user to the "Command Environment" section in description
of sudo's -i option.

13 years agoFix typo
Todd C. Miller [Thu, 9 Jun 2011 12:54:46 +0000 (08:54 -0400)]
Fix typo

13 years agoIf there is no old dependency for an object file, use the MANIFEST
Todd C. Miller [Wed, 8 Jun 2011 17:18:23 +0000 (13:18 -0400)]
If there is no old dependency for an object file, use the MANIFEST
to find its source.

13 years agoRemove dependency for getgrouplist.lo as we don't ship that source file.
Todd C. Miller [Wed, 8 Jun 2011 17:17:51 +0000 (13:17 -0400)]
Remove dependency for getgrouplist.lo as we don't ship that source file.

13 years agoDo not declare yyparse() static as the actual function generated
Todd C. Miller [Tue, 7 Jun 2011 15:45:06 +0000 (11:45 -0400)]
Do not declare yyparse() static as the actual function generated
by yacc is extern.

13 years agoRemove locale files in "make uninstall"
Todd C. Miller [Mon, 6 Jun 2011 18:40:42 +0000 (14:40 -0400)]
Remove locale files in "make uninstall"

13 years agoAdd Basque translation and sync Finish and Ukranian translations.
Todd C. Miller [Mon, 6 Jun 2011 17:38:54 +0000 (13:38 -0400)]
Add Basque translation and sync Finish and Ukranian translations.

13 years agoFreeBSD no longer needs the main sudo binary to link with -lpam
Todd C. Miller [Mon, 6 Jun 2011 15:02:52 +0000 (11:02 -0400)]
FreeBSD no longer needs the main sudo binary to link with -lpam
now that plug-ins are loaded with RTLD_GLOBAL.

13 years agoLoad plugins with RTLD_GLOBAL instead of RTLD_LOCAL. This fixes
Todd C. Miller [Mon, 6 Jun 2011 14:53:58 +0000 (10:53 -0400)]
Load plugins with RTLD_GLOBAL instead of RTLD_LOCAL.  This fixes
problems with pam modules not having access to symbols provided by
libpam on some platforms.  Affects FreeBSD and SLES 10 at least.

13 years agoMove xgettext invocation out of update-po target into update-pot
Todd C. Miller [Mon, 6 Jun 2011 12:46:50 +0000 (08:46 -0400)]
Move xgettext invocation out of update-po target into update-pot

13 years agoRegenerate .pot files for 1.8.2rc2
Todd C. Miller [Sat, 4 Jun 2011 22:27:59 +0000 (18:27 -0400)]
Regenerate .pot files for 1.8.2rc2

13 years agoMove nls targets to the top level Makefile so the paths in
Todd C. Miller [Sat, 4 Jun 2011 22:27:13 +0000 (18:27 -0400)]
Move nls targets to the top level Makefile so the paths in
the pot file are saner

13 years agoAdd compiled version of sudo Finish translation
Todd C. Miller [Sat, 4 Jun 2011 14:14:41 +0000 (10:14 -0400)]
Add compiled version of sudo Finish translation

13 years agoUpdate MANIFEST with .po and .mo files
Todd C. Miller [Sat, 4 Jun 2011 14:11:10 +0000 (10:11 -0400)]
Update MANIFEST with .po and .mo files
Rebuild sudoers fi and uk .mo files

13 years agoAdd Finish translation from translationproject.org
Todd C. Miller [Sat, 4 Jun 2011 13:58:44 +0000 (09:58 -0400)]
Add Finish translation from translationproject.org

13 years agoThe group named by exempt_group should not have a % prefix.
Todd C. Miller [Fri, 3 Jun 2011 14:09:10 +0000 (10:09 -0400)]
The group named by exempt_group should not have a % prefix.

13 years agoFix typo; "Defaults group_plugin" not "Defaults sudo_plugin"
Todd C. Miller [Wed, 1 Jun 2011 16:26:13 +0000 (12:26 -0400)]
Fix typo; "Defaults group_plugin" not "Defaults sudo_plugin"

13 years agoFix compressed io log corruption in background mode by using _exit()
Todd C. Miller [Tue, 31 May 2011 16:49:22 +0000 (12:49 -0400)]
Fix compressed io log corruption in background mode by using _exit()
instead of exit() to avoid flushing buffers twice.

Improved background mode support.  When not allocating a pty, the
command is run in its own process group.  This prevents write access
to the tty.  When running in a pty, stdin is not hooked up and we
never read from /dev/tty, which results in similar behavior.

13 years agoClean up regress files
Todd C. Miller [Tue, 31 May 2011 13:58:41 +0000 (09:58 -0400)]
Clean up regress files
Generate proper dependencies for regress objs in compat

13 years agoAdd missing dependency for check_fill.o.
Todd C. Miller [Tue, 31 May 2011 13:43:37 +0000 (09:43 -0400)]
Add missing dependency for check_fill.o.

13 years agoAdd support for --enable-nls[=location]
Todd C. Miller [Sun, 29 May 2011 18:33:18 +0000 (14:33 -0400)]
Add support for --enable-nls[=location]

13 years agoInclude gettext.h
Todd C. Miller [Sat, 28 May 2011 19:32:11 +0000 (15:32 -0400)]
Include gettext.h

13 years agoQuiet gcc warnings.
Todd C. Miller [Sat, 28 May 2011 19:27:14 +0000 (15:27 -0400)]
Quiet gcc warnings.

13 years agoDon't install .mo files if gettext was not found.
Todd C. Miller [Sat, 28 May 2011 13:18:46 +0000 (09:18 -0400)]
Don't install .mo files if gettext was not found.

13 years agoAlways allocate a pty when running a command in the background but
Todd C. Miller [Fri, 27 May 2011 19:20:20 +0000 (15:20 -0400)]
Always allocate a pty when running a command in the background but
call setsid() after forking to make sure we don't end up with a
controlling tty.

13 years agoAdd missing space between command name and the first command line argument.
Todd C. Miller [Fri, 27 May 2011 18:07:23 +0000 (14:07 -0400)]
Add missing space between command name and the first command line argument.

13 years agoQuiet a compiler warning on some platforms.
Todd C. Miller [Fri, 27 May 2011 17:50:37 +0000 (13:50 -0400)]
Quiet a compiler warning on some platforms.

13 years agoREADME file that directs people to translationproject.org
Todd C. Miller [Fri, 27 May 2011 17:15:27 +0000 (13:15 -0400)]
README file that directs people to translationproject.org

13 years agoSync translations with TP
Todd C. Miller [Fri, 27 May 2011 16:53:05 +0000 (12:53 -0400)]
Sync translations with TP

13 years agoAdd 'sync-po' target to top-level Makefile to rsync the po files
Todd C. Miller [Fri, 27 May 2011 16:52:47 +0000 (12:52 -0400)]
Add 'sync-po' target to top-level Makefile to rsync the po files
from translationproject.org.

13 years agoinstall nls files from install target
Todd C. Miller [Fri, 27 May 2011 14:24:55 +0000 (10:24 -0400)]
install nls files from install target

13 years agoInclude .mo files in sudo binary packags.
Todd C. Miller [Fri, 27 May 2011 14:17:34 +0000 (10:17 -0400)]
Include .mo files in sudo binary packags.

13 years agoAdd simplified chinese translation
Todd C. Miller [Fri, 27 May 2011 11:54:52 +0000 (07:54 -0400)]
Add simplified chinese translation

13 years agoAdd ukranian translation
Todd C. Miller [Thu, 26 May 2011 19:23:55 +0000 (15:23 -0400)]
Add ukranian translation

13 years agorefer to siglist.c, not ./siglist.c since not all makes will
Todd C. Miller [Thu, 26 May 2011 19:18:11 +0000 (15:18 -0400)]
refer to siglist.c, not ./siglist.c since not all makes will
treat foo and ./foo the same.

13 years agoSet def_preserve_groups before searching for the command when the -P
Todd C. Miller [Thu, 26 May 2011 16:52:59 +0000 (12:52 -0400)]
Set def_preserve_groups before searching for the command when the -P
flag is specified.

13 years agoAdd dependency for siglist.lo in compat. This is a generated file so
Todd C. Miller [Thu, 26 May 2011 16:12:43 +0000 (12:12 -0400)]
Add dependency for siglist.lo in compat.  This is a generated file so
"make depend" needs to depend on it.

13 years agoMore dependency fixes.
Todd C. Miller [Thu, 26 May 2011 15:46:11 +0000 (11:46 -0400)]
More dependency fixes.

13 years agoFix a few dependencies.
Todd C. Miller [Thu, 26 May 2011 15:41:13 +0000 (11:41 -0400)]
Fix a few dependencies.

13 years agoPlace compiled mo files in the src dir, not the build dir.
Todd C. Miller [Thu, 26 May 2011 15:12:54 +0000 (11:12 -0400)]
Place compiled mo files in the src dir, not the build dir.
When installing compiled mo files, display a status message.

13 years agoTivoli Directory Server requires that seconds be present in a
Todd C. Miller [Wed, 25 May 2011 19:04:34 +0000 (15:04 -0400)]
Tivoli Directory Server requires that seconds be present in a
timestamp, even though RFC 4517 states that they are optional.

13 years agoAdd missing bit of copyright
Todd C. Miller [Wed, 25 May 2011 18:15:37 +0000 (14:15 -0400)]
Add missing bit of copyright

13 years agoMention cycle detection warnings
Todd C. Miller [Wed, 25 May 2011 17:07:43 +0000 (13:07 -0400)]
Mention cycle detection warnings

13 years agoWhen checking aliases, also check the contents of the alias in case there
Todd C. Miller [Wed, 25 May 2011 17:04:13 +0000 (13:04 -0400)]
When checking aliases, also check the contents of the alias in case there
are problems with an alias that is referenced inside another.
Replace the self reference check with real alias cycle detection.

13 years agoSet errno to ELOOP in alias_find() if there is a cycle.
Todd C. Miller [Wed, 25 May 2011 16:54:15 +0000 (12:54 -0400)]
Set errno to ELOOP in alias_find() if there is a cycle.
Set errno to ENOENT in alias_find() and alias_remove() if the
entry could not be found.

13 years agoIncrement alias_seqno before calls to alias_remove_recursive() to
Todd C. Miller [Wed, 25 May 2011 15:31:11 +0000 (11:31 -0400)]
Increment alias_seqno before calls to alias_remove_recursive() to
avoid false positives with the alias loop detection.  Fixes spurious
warnings about unused aliases when they are nested.

13 years agoadd mkdep.pl
Todd C. Miller [Wed, 25 May 2011 14:20:07 +0000 (10:20 -0400)]
add mkdep.pl

13 years agoAdd dependency on convenience libs to binaries
Todd C. Miller [Wed, 25 May 2011 14:19:29 +0000 (10:19 -0400)]
Add dependency on convenience libs to binaries

13 years agomkdep.pl only works when run from the src dir
Todd C. Miller [Wed, 25 May 2011 14:07:20 +0000 (10:07 -0400)]
mkdep.pl only works when run from the src dir

13 years agoAuto-generate Makefile dependencies with a perl script.
Todd C. Miller [Wed, 25 May 2011 13:02:25 +0000 (09:02 -0400)]
Auto-generate Makefile dependencies with a perl script.

13 years agoIf the user specifies a runas group via sudo's -g option that matches
Todd C. Miller [Mon, 23 May 2011 18:00:54 +0000 (14:00 -0400)]
If the user specifies a runas group via sudo's -g option that matches
the runas user's group in the passwd database and that group is not
denied in the Runas_Spec, allow it.  Thus, if user root's gid in
/etc/passwd is 0, then "sudo -u root -g root id" is allow even if
no groups are present in the Runas_Spec.

13 years agoAdd dependencies on gettext.h
Todd C. Miller [Sun, 22 May 2011 17:31:48 +0000 (13:31 -0400)]
Add dependencies on gettext.h

13 years agoFix install-nls target with HP-UX sh when gettext is not present.
Todd C. Miller [Sun, 22 May 2011 14:10:43 +0000 (10:10 -0400)]
Fix install-nls target with HP-UX sh when gettext is not present.

13 years agoregenerate .pot files for lbuf changes
Todd C. Miller [Fri, 20 May 2011 19:33:34 +0000 (15:33 -0400)]
regenerate .pot files for lbuf changes

13 years agoAdd missing "checking" message for gettext when using the cache.
Todd C. Miller [Fri, 20 May 2011 19:27:45 +0000 (15:27 -0400)]
Add missing "checking" message for gettext when using the cache.

13 years agoAdd primitive format string support to the lbuf code to make translations
Todd C. Miller [Fri, 20 May 2011 19:25:03 +0000 (15:25 -0400)]
Add primitive format string support to the lbuf code to make translations
simpler.

13 years agoAdd message catalog template files for sudo and the sudoers module.
Todd C. Miller [Fri, 20 May 2011 17:20:14 +0000 (13:20 -0400)]
Add message catalog template files for sudo and the sudoers module.

13 years agoAdd gettext.h convenience header. This is similar to but distinct from
Todd C. Miller [Fri, 20 May 2011 15:48:17 +0000 (11:48 -0400)]
Add gettext.h convenience header.  This is similar to but distinct from
the one included with the gettext package.

13 years agoAdd checks for nroff -c and -Tascii flags
Todd C. Miller [Thu, 19 May 2011 22:00:31 +0000 (18:00 -0400)]
Add checks for nroff -c and -Tascii flags

13 years agoAdd check for HP bundled C Compiler (which cannot create shared libs)
Todd C. Miller [Thu, 19 May 2011 21:34:38 +0000 (17:34 -0400)]
Add check for HP bundled C Compiler (which cannot create shared libs)

13 years agoFix C format warnings.
Todd C. Miller [Thu, 19 May 2011 20:21:59 +0000 (16:21 -0400)]
Fix C format warnings.

13 years agoAdd __printflike
Todd C. Miller [Thu, 19 May 2011 20:21:41 +0000 (16:21 -0400)]
Add __printflike

13 years agoTranslate help / usage strings.
Todd C. Miller [Thu, 19 May 2011 20:07:14 +0000 (16:07 -0400)]
Translate help / usage strings.

13 years agoSet --msgid-bugs-address to the bugzilla url
Todd C. Miller [Thu, 19 May 2011 20:06:53 +0000 (16:06 -0400)]
Set --msgid-bugs-address to the bugzilla url