]> granicus.if.org Git - sudo/log
sudo
11 years agoSudo 1.8.9 also fixes bug #617
Todd C. Miller [Wed, 8 Jan 2014 21:34:15 +0000 (14:34 -0700)]
Sudo 1.8.9 also fixes bug #617

11 years agoThe fix for the hang was already in the 1.8.9 tarballs.
Todd C. Miller [Tue, 7 Jan 2014 18:06:24 +0000 (11:06 -0700)]
The fix for the hang was already in the 1.8.9 tarballs.

11 years agoUpdate for sudo 1.8.9p1
Todd C. Miller [Tue, 7 Jan 2014 17:44:35 +0000 (10:44 -0700)]
Update for sudo 1.8.9p1

11 years agoUpdate copyright year.
Todd C. Miller [Tue, 7 Jan 2014 17:43:31 +0000 (10:43 -0700)]
Update copyright year.

11 years agoGo back to making the bit fields in struct cmndtag explicitly signed.
Todd C. Miller [Tue, 7 Jan 2014 17:35:56 +0000 (10:35 -0700)]
Go back to making the bit fields in struct cmndtag explicitly signed.
This fixes a problem on gcc 4.8 (at least) which appears to be
treating the value as unsigned by default.

11 years agoUse debug_return_int() instead of bare return for debugging support.
Todd C. Miller [Tue, 7 Jan 2014 16:30:28 +0000 (09:30 -0700)]
Use debug_return_int() instead of bare return for debugging support.

11 years agoFix infinite loop that could be triggered by sudo_ev_loopbreak()
Todd C. Miller [Mon, 6 Jan 2014 18:20:38 +0000 (11:20 -0700)]
Fix infinite loop that could be triggered by sudo_ev_loopbreak()
and sudo_ev_loopcontinue().

11 years agoUpdate for 1.8.9 final.
Todd C. Miller [Mon, 6 Jan 2014 17:15:05 +0000 (10:15 -0700)]
Update for 1.8.9 final.

11 years agoHandle a sequence file with no trailing newline.
Todd C. Miller [Sat, 4 Jan 2014 19:42:34 +0000 (12:42 -0700)]
Handle a sequence file with no trailing newline.

11 years agoTruncate io log and timing files on open when recycling them.
Todd C. Miller [Sat, 4 Jan 2014 01:28:07 +0000 (18:28 -0700)]
Truncate io log and timing files on open when recycling them.
Only an issue when the sequence number wraps around.

11 years agoRepair reading of the iolog sequence number that got broken when
Todd C. Miller [Sat, 4 Jan 2014 01:11:27 +0000 (18:11 -0700)]
Repair reading of the iolog sequence number that got broken when
adding stricter strtoul() checks.

11 years agoIf invoked as sudoedit we can't just exec the command directly since
Todd C. Miller [Fri, 3 Jan 2014 23:41:25 +0000 (16:41 -0700)]
If invoked as sudoedit we can't just exec the command directly since
the temporary files need to be updated before sudo exits.

11 years agoFix restoration of the close-on-exec flag when moving a relocated
Todd C. Miller [Fri, 3 Jan 2014 21:34:14 +0000 (14:34 -0700)]
Fix restoration of the close-on-exec flag when moving a relocated
fd back into its original position.

11 years agoAdd "see below" to reference "Secure editing" section in "Preventing
Todd C. Miller [Thu, 2 Jan 2014 17:40:03 +0000 (10:40 -0700)]
Add "see below" to reference "Secure editing" section in "Preventing
shell escapes".

11 years agoAdd initial "Secure editing" section.
Todd C. Miller [Wed, 1 Jan 2014 14:07:37 +0000 (07:07 -0700)]
Add initial "Secure editing" section.

11 years agoUpdate copyright year.
Todd C. Miller [Wed, 1 Jan 2014 14:07:21 +0000 (07:07 -0700)]
Update copyright year.

11 years agosync with translationproject.org
Todd C. Miller [Tue, 31 Dec 2013 23:23:44 +0000 (16:23 -0700)]
sync with translationproject.org

11 years agoMake user_cwd and user_tty dynamically allocated even for the
Todd C. Miller [Tue, 31 Dec 2013 22:58:52 +0000 (15:58 -0700)]
Make user_cwd and user_tty dynamically allocated even for the
"unknown" case.

11 years agoUse -fstack-protector-strong in preference to -fstack-protector-all
Todd C. Miller [Mon, 30 Dec 2013 15:49:34 +0000 (08:49 -0700)]
Use -fstack-protector-strong in preference to -fstack-protector-all
or -fstack-protector.

11 years agoDell acquired Quest
Todd C. Miller [Mon, 30 Dec 2013 15:26:58 +0000 (08:26 -0700)]
Dell acquired Quest

11 years agosync with translationproject.org
Todd C. Miller [Sun, 29 Dec 2013 16:12:23 +0000 (09:12 -0700)]
sync with translationproject.org

11 years agosync with translationproject.org
Todd C. Miller [Sun, 29 Dec 2013 01:40:15 +0000 (18:40 -0700)]
sync with translationproject.org

11 years agoregen
Todd C. Miller [Sat, 28 Dec 2013 21:28:52 +0000 (14:28 -0700)]
regen

11 years agoUpdate for recent changes.
Todd C. Miller [Sat, 28 Dec 2013 21:23:30 +0000 (14:23 -0700)]
Update for recent changes.

11 years agoFix typo; we want setlocale(LC_ALL, "") since we are setting the
Todd C. Miller [Sat, 28 Dec 2013 14:59:45 +0000 (07:59 -0700)]
Fix typo; we want setlocale(LC_ALL, "") since we are setting the
locale for the first time.

11 years agoUse sudoers_initlocale() in main() startup, not sudoers_setlocal()
Todd C. Miller [Fri, 27 Dec 2013 13:50:06 +0000 (06:50 -0700)]
Use sudoers_initlocale() in main() startup, not sudoers_setlocal()
as the latter assumes we are already in the user's locale which may
not be the case.  For sudoreplay, we can just use setlocale()
directly as there is no sudoers locale.

11 years agoRedo preserve_fds support to remap high fds so we can get the most
Todd C. Miller [Tue, 24 Dec 2013 22:01:00 +0000 (15:01 -0700)]
Redo preserve_fds support to remap high fds so we can get the most
out of closefrom().  The fds are then restored after closefrom().

11 years agoFix install-plugin when sudoers is compiled statically.
Todd C. Miller [Tue, 24 Dec 2013 21:50:28 +0000 (14:50 -0700)]
Fix install-plugin when sudoers is compiled statically.

11 years agoAdd support for preventing fds from getting clobbered by closefrom().
Todd C. Miller [Fri, 20 Dec 2013 18:14:32 +0000 (11:14 -0700)]
Add support for preventing fds from getting clobbered by closefrom().

11 years agoregen
Todd C. Miller [Thu, 19 Dec 2013 23:44:05 +0000 (16:44 -0700)]
regen

11 years agoNeed to include limits.h here too.
Todd C. Miller [Wed, 18 Dec 2013 22:01:04 +0000 (15:01 -0700)]
Need to include limits.h here too.

11 years agoNo need to use __signed.
Todd C. Miller [Tue, 17 Dec 2013 23:08:18 +0000 (16:08 -0700)]
No need to use __signed.

11 years agoNeed limits.h here too.
Todd C. Miller [Tue, 17 Dec 2013 23:02:32 +0000 (16:02 -0700)]
Need limits.h here too.

11 years agoStill need limits.h here.
Todd C. Miller [Tue, 17 Dec 2013 21:32:24 +0000 (14:32 -0700)]
Still need limits.h here.

11 years agoregen
Todd C. Miller [Tue, 17 Dec 2013 17:48:20 +0000 (10:48 -0700)]
regen

11 years agoGo back to using /proc/self/fd instead of /proc/$$/fd as only AIX
Todd C. Miller [Tue, 17 Dec 2013 14:38:20 +0000 (07:38 -0700)]
Go back to using /proc/self/fd instead of /proc/$$/fd as only AIX
lacks /proc/self and it has F_CLOSEM.

11 years agoUse a switch to map digest type to name instead of an array of
Todd C. Miller [Tue, 17 Dec 2013 00:00:17 +0000 (17:00 -0700)]
Use a switch to map digest type to name instead of an array of
strings.

11 years agoUse /dev/fd in closefrom() on FreeBSD < 8.0 and Mac OS X.
Todd C. Miller [Mon, 16 Dec 2013 23:24:02 +0000 (16:24 -0700)]
Use /dev/fd in closefrom() on FreeBSD < 8.0 and Mac OS X.

11 years agoRemove _MAX and _MIN compat; we rely on missing.h for that.
Todd C. Miller [Mon, 16 Dec 2013 21:53:27 +0000 (14:53 -0700)]
Remove _MAX and _MIN compat; we rely on missing.h for that.
We already require the compiler handle long long so there's
no need to use HAVE_LONG_LONG_INT everywhere.

11 years agoRemove _MAX and _MIN defines that any system from the last 20 years
Todd C. Miller [Mon, 16 Dec 2013 21:52:31 +0000 (14:52 -0700)]
Remove _MAX and _MIN defines that any system from the last 20 years
should have.  Add ULLONG_MAX in case it is missing.

11 years agoChange visudo -x to take a file name argument, which may be '-' to
Todd C. Miller [Mon, 16 Dec 2013 21:32:42 +0000 (14:32 -0700)]
Change visudo -x to take a file name argument, which may be '-' to
write the exported sudoers file to stdout.

11 years agoMove symbol extern defs into sudoers.h
Todd C. Miller [Mon, 16 Dec 2013 21:18:42 +0000 (14:18 -0700)]
Move symbol extern defs into sudoers.h

11 years agoAdd missing sudo_util.h
Todd C. Miller [Mon, 16 Dec 2013 21:14:36 +0000 (14:14 -0700)]
Add missing sudo_util.h

11 years agoWarn if the time stamp in the I/O log file does not fit in time_t.
Todd C. Miller [Sat, 14 Dec 2013 15:30:37 +0000 (08:30 -0700)]
Warn if the time stamp in the I/O log file does not fit in time_t.
Warn if the info line is not well-formed instead of silently ignoring
it.

11 years agoRename libcommon libsudo_util
Todd C. Miller [Fri, 13 Dec 2013 14:46:05 +0000 (07:46 -0700)]
Rename libcommon libsudo_util

11 years agoMove prototypes for functions provided by libcommon that don't have
Todd C. Miller [Fri, 13 Dec 2013 01:29:07 +0000 (18:29 -0700)]
Move prototypes for functions provided by libcommon that don't have
their own header files into sudo_util.h.

11 years agoNow that we have proper number parsing functions we should store
Todd C. Miller [Wed, 11 Dec 2013 21:43:04 +0000 (14:43 -0700)]
Now that we have proper number parsing functions we should store
T_UINT defaults values as unsigned int, not int.

11 years agoDon't use int where we really mean enum def_tuple. When this code
Todd C. Miller [Wed, 11 Dec 2013 21:31:50 +0000 (14:31 -0700)]
Don't use int where we really mean enum def_tuple.  When this code
was written it was assumed that we may have multiple tuple types.
However, that hasn't happened and probably never will.

11 years agoRegen after string parsing changes.
Todd C. Miller [Wed, 11 Dec 2013 20:55:12 +0000 (13:55 -0700)]
Regen after string parsing changes.

11 years agoThe OpenBSD strtonum() uses very short error strings that can't
Todd C. Miller [Wed, 11 Dec 2013 20:43:10 +0000 (13:43 -0700)]
The OpenBSD strtonum() uses very short error strings that can't
be translated usefully.  Convert them to longer strings on error.
Also use the longer strings for atomode() and atoid().

11 years agoAdd atomode() function for parsing a file mode.
Todd C. Miller [Tue, 10 Dec 2013 23:56:54 +0000 (16:56 -0700)]
Add atomode() function for parsing a file mode.

11 years agoUse strtonum() instead of atoi(), strtol() or strtoul() where possible.
Todd C. Miller [Tue, 10 Dec 2013 23:23:21 +0000 (16:23 -0700)]
Use strtonum() instead of atoi(), strtol() or strtoul() where possible.

11 years agoAdd strtonum.c to compat for simpler number parsing.
Todd C. Miller [Tue, 10 Dec 2013 21:38:52 +0000 (14:38 -0700)]
Add strtonum.c to compat for simpler number parsing.

11 years agoFix a warning on Solaris, we need to use debug_return_const_ptr.
Todd C. Miller [Mon, 9 Dec 2013 21:06:46 +0000 (14:06 -0700)]
Fix a warning on Solaris, we need to use debug_return_const_ptr.

11 years agocheck_symbols needs to link with SUDO_LIBS in order to get -lpthread
Todd C. Miller [Mon, 9 Dec 2013 21:00:55 +0000 (14:00 -0700)]
check_symbols needs to link with SUDO_LIBS in order to get -lpthread
on HP-UX for libldap (which uses threads).  It would be better to
have a separate variable for the pthread library but this is no
worse than it used to be.

11 years agoadd missing comma
Todd C. Miller [Sun, 8 Dec 2013 18:20:32 +0000 (11:20 -0700)]
add missing comma

11 years agoMake -c option description more accurate.
Todd C. Miller [Sun, 8 Dec 2013 18:06:27 +0000 (11:06 -0700)]
Make -c option description more accurate.

11 years agoWhen checking whether a user may change the login class, just check
Todd C. Miller [Sat, 7 Dec 2013 16:17:54 +0000 (09:17 -0700)]
When checking whether a user may change the login class, just check
pw_uid of the runas user, which was passed in to set_loginclass().

11 years agoUse atoid() when parsing user/group IDs and print them as unsigned int.
Todd C. Miller [Fri, 6 Dec 2013 21:10:03 +0000 (14:10 -0700)]
Use atoid() when parsing user/group IDs and print them as unsigned int.

11 years agoCorrectly parse 64-bit times in I/O log files.
Todd C. Miller [Thu, 5 Dec 2013 23:19:50 +0000 (16:19 -0700)]
Correctly parse 64-bit times in I/O log files.

11 years agoUse atoid() not atoi() when parsing uids/gids.
Todd C. Miller [Thu, 5 Dec 2013 22:51:56 +0000 (15:51 -0700)]
Use atoid() not atoi() when parsing uids/gids.

11 years agoBetter match debugging.
Todd C. Miller [Thu, 5 Dec 2013 21:34:56 +0000 (14:34 -0700)]
Better match debugging.
Sprinkle const in match functions.

11 years agoDocument that plugins can be compiled statically into the sudo binary.
Todd C. Miller [Wed, 4 Dec 2013 23:05:05 +0000 (16:05 -0700)]
Document that plugins can be compiled statically into the sudo binary.

11 years agosudo_sss_filter_user_netgroup(): fix comment typos, break out of loop
Todd C. Miller [Tue, 3 Dec 2013 22:47:45 +0000 (15:47 -0700)]
sudo_sss_filter_user_netgroup(): fix comment typos, break out of loop
early if we match ALL or netgroup.

11 years agoWhen filtering netgroups, use the passwd struct stashed in the handle,
Todd C. Miller [Tue, 3 Dec 2013 22:39:12 +0000 (15:39 -0700)]
When filtering netgroups, use the passwd struct stashed in the handle,
not user_name since we may be listing another users privileges.

11 years agoRHEL 6 and above builds sudo with SSSD support
Todd C. Miller [Tue, 3 Dec 2013 22:18:42 +0000 (15:18 -0700)]
RHEL 6 and above builds sudo with SSSD support

11 years agoAvoid passing NULL domainname to sudo_debug_printf().
Todd C. Miller [Tue, 3 Dec 2013 22:15:12 +0000 (15:15 -0700)]
Avoid passing NULL domainname to sudo_debug_printf().

11 years agoDocument sssd debug subsystem.
Todd C. Miller [Tue, 3 Dec 2013 21:42:33 +0000 (14:42 -0700)]
Document sssd debug subsystem.

11 years agoDocument "event" debug subsystem.
Todd C. Miller [Tue, 3 Dec 2013 21:40:58 +0000 (14:40 -0700)]
Document "event" debug subsystem.

11 years agoUse atoid() instead of atoi() when parsing uids/gids so we get
Todd C. Miller [Tue, 3 Dec 2013 21:33:26 +0000 (14:33 -0700)]
Use atoid() instead of atoi() when parsing uids/gids so we get
proper range checking.

11 years agoAdd user netgroup filtering for SSSD. Previously, rules for a
Todd C. Miller [Tue, 3 Dec 2013 21:19:37 +0000 (14:19 -0700)]
Add user netgroup filtering for SSSD.  Previously, rules for a
netgroup were applied to all even when they did not belong to the
specified netgroup.  RedHat Bugzilla 880150.

11 years agoFix several issues found by the clang static analyzer; Daniel Kopecek
Todd C. Miller [Tue, 3 Dec 2013 21:10:11 +0000 (14:10 -0700)]
Fix several issues found by the clang static analyzer; Daniel Kopecek

11 years agoMention how to dump sudoers info from LDAP.
Todd C. Miller [Mon, 2 Dec 2013 23:00:15 +0000 (16:00 -0700)]
Mention how to dump sudoers info from LDAP.

11 years agoOn Solaris, disabling the proc_exec privilege appears to interfere
Todd C. Miller [Mon, 2 Dec 2013 18:14:25 +0000 (11:14 -0700)]
On Solaris, disabling the proc_exec privilege appears to interfere
with DAC file permissions.  Adding DAC override permissions to the
inheritable set works around this for commands run as root without
giving extra permissions to other users.  Bug #626

11 years agoInstead of setprogname(), add initprogname() which gets the program
Todd C. Miller [Mon, 2 Dec 2013 02:12:21 +0000 (19:12 -0700)]
Instead of setprogname(), add initprogname() which gets the program
name for getprogname() using /proc or pstat() if possible.

11 years agoIgnore EOVERFLOW from pstat_getproc(). The HP-UX kernel appears
Todd C. Miller [Sun, 1 Dec 2013 01:43:57 +0000 (18:43 -0700)]
Ignore EOVERFLOW from pstat_getproc().  The HP-UX kernel appears
to return this in certain situations but it appears to be harmless
at least insofar as retrieving the tty goes.

11 years agoSync with translationproject.org
Todd C. Miller [Sat, 30 Nov 2013 22:19:19 +0000 (15:19 -0700)]
Sync with translationproject.org

11 years agoAdd missing newline in help message after export option.
Todd C. Miller [Thu, 28 Nov 2013 13:08:08 +0000 (06:08 -0700)]
Add missing newline in help message after export option.

11 years agoDo not add LIBDL to SUDO_LIBS or SUDOERS_LIBS in configure, do it
Todd C. Miller [Tue, 26 Nov 2013 14:15:55 +0000 (07:15 -0700)]
Do not add LIBDL to SUDO_LIBS or SUDOERS_LIBS in configure, do it
in Makefile.in so we can make it last.  Fixes a linking problem on
Ubuntu precise.

11 years agoDo not rely on NULL being defined for getaddrinfo() test.
Todd C. Miller [Mon, 25 Nov 2013 16:54:04 +0000 (09:54 -0700)]
Do not rely on NULL being defined for getaddrinfo() test.
Fixes the check on HP-UX 11.23.

11 years agoRegen for sudo 1.8.9b1
Todd C. Miller [Sun, 24 Nov 2013 23:37:32 +0000 (16:37 -0700)]
Regen for sudo 1.8.9b1

11 years agoSync with translationproject.org
Todd C. Miller [Sun, 24 Nov 2013 23:31:40 +0000 (16:31 -0700)]
Sync with translationproject.org

11 years agoAdd wrapper functions for dlopen() et al so that we can support
Todd C. Miller [Fri, 22 Nov 2013 23:35:15 +0000 (16:35 -0700)]
Add wrapper functions for dlopen() et al so that we can support
statically compiling in the sudoers plugin but still allow other
plugins to be loaded.  The new --enable-static-sudoers configure
option will cause the sudoers plugin to be compiled statically into
the sudo binary.  This does not prevent other plugins from being
loaded as per sudo.conf.

11 years agoHandle non-unix groups correctly. Get rid of runasuser and runasgroup
Todd C. Miller [Thu, 21 Nov 2013 16:45:55 +0000 (09:45 -0700)]
Handle non-unix groups correctly.  Get rid of runasuser and runasgroup
types and use username and usergroup instead.  The fact that the user
or group is inside a Runas_List doesn't affect its underlying type.

11 years agoSimplify Defaults list option object. The name and value strings
Todd C. Miller [Wed, 20 Nov 2013 21:35:35 +0000 (14:35 -0700)]
Simplify Defaults list option object.  The name and value strings
are superfluous.

11 years agoBack out unintended change.
Todd C. Miller [Wed, 20 Nov 2013 19:21:34 +0000 (12:21 -0700)]
Back out unintended change.

11 years agoAdd dedicated test for getaddrinfo(). Tru64 UNIX contains two
Todd C. Miller [Wed, 20 Nov 2013 19:04:47 +0000 (12:04 -0700)]
Add dedicated test for getaddrinfo().  Tru64 UNIX contains two
versions of getaddrinfo and we must include netdb.h to get the
proper definition.

11 years agoDefine RTLD_GLOBAL for older systems without it. Bug #621
Todd C. Miller [Wed, 20 Nov 2013 14:22:10 +0000 (07:22 -0700)]
Define RTLD_GLOBAL for older systems without it.  Bug #621

11 years agoRename snprintf replacement rpl_snprintf since we may now replace
Todd C. Miller [Tue, 19 Nov 2013 23:06:08 +0000 (16:06 -0700)]
Rename snprintf replacement rpl_snprintf since we may now replace
the libc version and #define rpl_snprintf snprintf in missing.h so
we get our version when needed.  This is consistent with how we
replace glob and fnmatch.

11 years agolibcommon tests need locale_stub.lo to link.
Todd C. Miller [Tue, 19 Nov 2013 18:00:41 +0000 (11:00 -0700)]
libcommon tests need locale_stub.lo to link.

11 years agoAdd check for C99 compliant (v)snprintf function.
Todd C. Miller [Tue, 19 Nov 2013 17:40:25 +0000 (10:40 -0700)]
Add check for C99 compliant (v)snprintf function.

11 years agoInclude unistd.h in sig2str.c for Tru64 as it defines SIGRTMIN and
Todd C. Miller [Tue, 19 Nov 2013 16:48:01 +0000 (09:48 -0700)]
Include unistd.h in sig2str.c for Tru64 as it defines SIGRTMIN and
SIGRTMAX in terms of sysconf(), which is prototyped in unistd.h.
Bug #621; from Daniel Richard G.

11 years agoAdd definition of U_ for --disable-nsl
Todd C. Miller [Tue, 19 Nov 2013 16:45:13 +0000 (09:45 -0700)]
Add definition of U_ for --disable-nsl
Don't define warning_gettext if --disable-nsl
Bug #621; from Daniel Richard G.

11 years agoWhen merging Defaults entries we need to check the type of the
Todd C. Miller [Mon, 18 Nov 2013 23:59:02 +0000 (16:59 -0700)]
When merging Defaults entries we need to check the type of the
next entry and not just assume it is the same as the previous one.

11 years agorunasgroups not runasgroup in the Cmnd_Spec.
Todd C. Miller [Mon, 18 Nov 2013 23:28:10 +0000 (16:28 -0700)]
runasgroups not runasgroup in the Cmnd_Spec.

11 years agoFix some syntax errors and change how lists are handled.
Todd C. Miller [Mon, 18 Nov 2013 19:00:44 +0000 (12:00 -0700)]
Fix some syntax errors and change how lists are handled.

11 years agoAllow sudo to compile without variadic macro support in cpp.
Todd C. Miller [Mon, 18 Nov 2013 16:10:09 +0000 (09:10 -0700)]
Allow sudo to compile without variadic macro support in cpp.
Debugging support will be limited (no file info from warnings.)
From Daniel Richard G.; Bug #621

11 years agoAdd warning_gettext() wrapper function that changes to the user locale,
Todd C. Miller [Mon, 18 Nov 2013 15:59:57 +0000 (08:59 -0700)]
Add warning_gettext() wrapper function that changes to the user locale,
then calls gettext().
Add U_ macro that calls warning_gettext() instead of gettext().
Rename warning2()/error2() back to warning_nodebug()/error_nodebug().

11 years agoFix some #if vs. #ifdef and remove an extraneous semicolon.
Todd C. Miller [Sun, 17 Nov 2013 23:15:36 +0000 (16:15 -0700)]
Fix some #if vs. #ifdef and remove an extraneous semicolon.
Bug #624; from Daniel Richard G.

11 years agoAdd debug_return_const_str and debug_return_const_ptr for returning
Todd C. Miller [Sun, 17 Nov 2013 23:11:39 +0000 (16:11 -0700)]
Add debug_return_const_str and debug_return_const_ptr for returning
a const string or pointer.  Using const for the normal versions
produces warnings with the Tru64 compiler.