]> granicus.if.org Git - sudo/log
sudo
10 years agoMention the fix for ^Z at the password prompt when sudo was started
Todd C. Miller [Wed, 5 Feb 2014 19:57:47 +0000 (12:57 -0700)]
Mention the fix for ^Z at the password prompt when sudo was started
in the background.

10 years agoIn term_restore(), only restores the terminal if we are in the
Todd C. Miller [Wed, 5 Feb 2014 19:03:58 +0000 (12:03 -0700)]
In term_restore(), only restores the terminal if we are in the
foregroup process group.  Instead of calling tcgetpgrp(), which is
racy, we set a temporary handler for SIGTTOU and check whether it
was received after a failed call to tcsetattr().

10 years agoUse inet_pton() instead of inet_aton() and include a version from
Todd C. Miller [Wed, 5 Feb 2014 17:00:07 +0000 (10:00 -0700)]
Use inet_pton() instead of inet_aton() and include a version from
BIND for those without it.

10 years agoQuiet a gcc warning.
Todd C. Miller [Wed, 5 Feb 2014 16:55:31 +0000 (09:55 -0700)]
Quiet a gcc warning.

10 years agoNeed to include limits.h for USHRT_MAX.
Todd C. Miller [Wed, 5 Feb 2014 16:55:30 +0000 (09:55 -0700)]
Need to include limits.h for USHRT_MAX.

10 years agoUse bool for function return values instead of 1 or 0.
Todd C. Miller [Tue, 4 Feb 2014 22:18:16 +0000 (15:18 -0700)]
Use bool for function return values instead of 1 or 0.

10 years agoWarn the user if the rundir needs to be cleared in the rc files.
Todd C. Miller [Tue, 4 Feb 2014 22:14:48 +0000 (15:14 -0700)]
Warn the user if the rundir needs to be cleared in the rc files.
Neither AIX not HP-UX clear /var/run (if it even exists).

10 years agoUpdate for sudo 1.8.9p5
Todd C. Miller [Tue, 4 Feb 2014 17:24:35 +0000 (10:24 -0700)]
Update for sudo 1.8.9p5

10 years agoWhen the closefrom limit is greater than any of the preserved fds,
Todd C. Miller [Tue, 4 Feb 2014 13:22:19 +0000 (06:22 -0700)]
When the closefrom limit is greater than any of the preserved fds,
the pfds list will be non-empty but lastfd will be -1 triggering
an ecalloc(0) assertion.  Instead, test for lastfd being -1 and
make sure we always update it, even if dup() fails.
Also restore initial value of lowfd after we are done relocating.
Fixes bug #633

10 years agoDocument function return values.
Todd C. Miller [Tue, 4 Feb 2014 13:13:43 +0000 (06:13 -0700)]
Document function return values.

10 years agoterm_restore() now restarts itself so we don't need to do it ourselves.
Todd C. Miller [Tue, 4 Feb 2014 03:36:48 +0000 (20:36 -0700)]
term_restore() now restarts itself so we don't need to do it ourselves.

10 years agosyscall restarting is broken on Mac OS X when interrupted by a tty
Todd C. Miller [Mon, 3 Feb 2014 23:51:51 +0000 (16:51 -0700)]
syscall restarting is broken on Mac OS X when interrupted by a tty
signal so restart tcsetattr() by hand.  For details, see.
http://openradar.appspot.com/radar?id=6402578615107584

10 years agoAdd regress for atobool(), atoid() and atomode()
Todd C. Miller [Mon, 3 Feb 2014 17:47:19 +0000 (10:47 -0700)]
Add regress for atobool(), atoid() and atomode()

10 years agoAdd back boottime.lo
Todd C. Miller [Mon, 3 Feb 2014 15:08:54 +0000 (08:08 -0700)]
Add back boottime.lo

10 years agoMention that rundir and vardir may be the same and what to do if they are.
Todd C. Miller [Mon, 3 Feb 2014 13:16:51 +0000 (06:16 -0700)]
Mention that rundir and vardir may be the same and what to do if they are.

10 years agoBring back boot time checking code and zero out time stamp files
Todd C. Miller [Mon, 3 Feb 2014 12:45:27 +0000 (05:45 -0700)]
Bring back boot time checking code and zero out time stamp files
that predate the boot time.  This should help systems w/o /var/run
where the admin has setup rc.d to clear the timestamp directory.

10 years agoCheck libraries for inet_pton() if not in libc.
Todd C. Miller [Mon, 3 Feb 2014 12:42:39 +0000 (05:42 -0700)]
Check libraries for inet_pton() if not in libc.

10 years agoFix clock_gettime() detection when it lives in librt.
Todd C. Miller [Sun, 2 Feb 2014 15:34:53 +0000 (08:34 -0700)]
Fix clock_gettime() detection when it lives in librt.
Some systems have inet_aton() in libresolv (older Solaris).

10 years agoAvoid duplicate directories if vardir and rundir are the same.
Todd C. Miller [Sun, 2 Feb 2014 13:39:05 +0000 (06:39 -0700)]
Avoid duplicate directories if vardir and rundir are the same.

10 years agoregen
Todd C. Miller [Sun, 2 Feb 2014 12:23:54 +0000 (05:23 -0700)]
regen

10 years agoElaborate on time stamp error message causes.
Todd C. Miller [Sun, 2 Feb 2014 12:17:47 +0000 (05:17 -0700)]
Elaborate on time stamp error message causes.

10 years agoRemove the time stamp dir and its contents when uninstalling. We
Todd C. Miller [Sat, 1 Feb 2014 13:30:40 +0000 (06:30 -0700)]
Remove the time stamp dir and its contents when uninstalling.  We
currently leave the lecture status files installed until there is
a better way to detect upgrades.

10 years agoUpdate time stamp error messages and regen.
Todd C. Miller [Sat, 1 Feb 2014 13:15:14 +0000 (06:15 -0700)]
Update time stamp error messages and regen.

10 years agoRestore warning when sudoers is unable to update the time stamp file.
Todd C. Miller [Sat, 1 Feb 2014 13:11:29 +0000 (06:11 -0700)]
Restore warning when sudoers is unable to update the time stamp file.

10 years agoReplace --with-timedir and --with-lecture_dir with --with-rundir
Todd C. Miller [Sat, 1 Feb 2014 12:57:34 +0000 (05:57 -0700)]
Replace --with-timedir and --with-lecture_dir with --with-rundir
and --with-vardir which are the parent directories of the time stamp
and lecture dirs.  These directories need to be searchable by
non-root so that the timestampowner setting can function.

10 years agoFix use of timestampowner in the new time stamp world order. Parent
Todd C. Miller [Sat, 1 Feb 2014 12:47:16 +0000 (05:47 -0700)]
Fix use of timestampowner in the new time stamp world order.  Parent
directories for timestampdir and lecture_dir are now created with
the execute bit set so that we can traverse them as non-root.

10 years agoRegen Makefiles.
Todd C. Miller [Fri, 31 Jan 2014 22:46:25 +0000 (15:46 -0700)]
Regen Makefiles.

10 years agoMove ctim_get and mtim_get to sudo_util.h
Todd C. Miller [Fri, 31 Jan 2014 22:43:34 +0000 (15:43 -0700)]
Move ctim_get and mtim_get to sudo_util.h

10 years agosprinkle some debug printfs and add function header comments
Todd C. Miller [Fri, 31 Jan 2014 22:28:41 +0000 (15:28 -0700)]
sprinkle some debug printfs and add function header comments

10 years agoProperly handle the case where /var/run/sudo/ts doesn't exist.
Todd C. Miller [Fri, 31 Jan 2014 22:02:31 +0000 (15:02 -0700)]
Properly handle the case where /var/run/sudo/ts doesn't exist.

10 years agofix typo
Todd C. Miller [Fri, 31 Jan 2014 17:12:21 +0000 (10:12 -0700)]
fix typo

10 years agoMention "sudo -K" change.
Todd C. Miller [Fri, 31 Jan 2014 17:05:57 +0000 (10:05 -0700)]
Mention "sudo -K" change.

10 years agoUpgrade info for 1.8.10
Todd C. Miller [Fri, 31 Jan 2014 17:05:49 +0000 (10:05 -0700)]
Upgrade info for 1.8.10

10 years agoWarn on ftruncate failure().
Todd C. Miller [Thu, 30 Jan 2014 23:24:48 +0000 (16:24 -0700)]
Warn on ftruncate failure().

10 years agoFix checking of lecture status.
Todd C. Miller [Thu, 30 Jan 2014 23:15:03 +0000 (16:15 -0700)]
Fix checking of lecture status.

10 years agoDo not override timedir on Debian.
Todd C. Miller [Thu, 30 Jan 2014 23:07:28 +0000 (16:07 -0700)]
Do not override timedir on Debian.

10 years agoUse sudo_timeval macros and remove compat macros from missing.h
Todd C. Miller [Thu, 30 Jan 2014 22:51:59 +0000 (15:51 -0700)]
Use sudo_timeval macros and remove compat macros from missing.h

10 years agoSwitch to new time stamp file format. Each user now has a single
Todd C. Miller [Thu, 30 Jan 2014 22:50:40 +0000 (15:50 -0700)]
Switch to new time stamp file format.  Each user now has a single
file which may contain multiple records when per-tty time stamps
are in use (the default).  The time stamps use a monotonic timer
where available and are once again stored in /var/run/sudo.  The
lecture status is now stored separately from the time stamps in a
different directory.

10 years agoWhen listing a user's privileges, always prompt the user for their
Todd C. Miller [Wed, 29 Jan 2014 22:19:45 +0000 (15:19 -0700)]
When listing a user's privileges, always prompt the user for their
own password, regardless of the value of target_pw, root_pw or
runas_pw.

10 years agoZero out errstr when there is no error; fixes bug #632
Todd C. Miller [Thu, 30 Jan 2014 20:06:29 +0000 (13:06 -0700)]
Zero out errstr when there is no error; fixes bug #632

11 years agoUse inet_aton() instead of inet_addr() as it allows us to distinguish
Todd C. Miller [Sun, 26 Jan 2014 20:23:09 +0000 (13:23 -0700)]
Use inet_aton() instead of inet_addr() as it allows us to distinguish
between the address (or mask 255.255.255.255) and an error.  In the
future we may consider switching to inet_pton() for IPv4 too.

11 years agoFix typo, ULONG_MAX vs. ULLONG_MAX
Todd C. Miller [Fri, 24 Jan 2014 23:08:28 +0000 (16:08 -0700)]
Fix typo, ULONG_MAX vs. ULLONG_MAX

11 years agoFix typo in the AIX case.
Todd C. Miller [Fri, 24 Jan 2014 16:43:10 +0000 (09:43 -0700)]
Fix typo in the AIX case.

11 years agoSize pointer for sudo_parseln() should be size_t not ssize_t.
Todd C. Miller [Fri, 24 Jan 2014 16:39:11 +0000 (09:39 -0700)]
Size pointer for sudo_parseln() should be size_t not ssize_t.
This was already correct for the nsswitch.conf case.

11 years agoIt is now possible to disable network interface probing in sudo.conf
Todd C. Miller [Thu, 23 Jan 2014 21:52:54 +0000 (14:52 -0700)]
It is now possible to disable network interface probing in sudo.conf
by changing the value of the probe_interfaces setting.

11 years agoIf inet_addr() returns INADDR_NONE, return false instead of iterating
Todd C. Miller [Thu, 23 Jan 2014 03:48:49 +0000 (20:48 -0700)]
If inet_addr() returns INADDR_NONE, return false instead of iterating
through the interfaces looking for a match that will never happen.

11 years agoAdd explicit dependency on sudoers.la to sudo target when sudoers
Todd C. Miller [Wed, 22 Jan 2014 21:47:27 +0000 (14:47 -0700)]
Add explicit dependency on sudoers.la to sudo target when sudoers
is compiled statically into the sudo binary.

11 years agoDo not assume localtime(), gmtime() and ctime() always return non-NULL.
Todd C. Miller [Tue, 21 Jan 2014 23:32:00 +0000 (16:32 -0700)]
Do not assume localtime(), gmtime() and ctime() always return non-NULL.

11 years agoUpdate copyright years
Todd C. Miller [Wed, 15 Jan 2014 13:19:34 +0000 (06:19 -0700)]
Update copyright years

11 years agoEliminate dead store found by clang checker.
Todd C. Miller [Wed, 15 Jan 2014 13:13:23 +0000 (06:13 -0700)]
Eliminate dead store found by clang checker.

11 years agoUpdate for sudo 1.8.9p4
Todd C. Miller [Wed, 15 Jan 2014 13:01:54 +0000 (06:01 -0700)]
Update for sudo 1.8.9p4

11 years agoWhen relocating fds, update the debug fd if it is set so we are
Todd C. Miller [Wed, 15 Jan 2014 13:00:59 +0000 (06:00 -0700)]
When relocating fds, update the debug fd if it is set so we are
guaranteed to get debugging output.

11 years agoIf the event loop exits due to an error and we are not logging I/O,
Todd C. Miller [Wed, 15 Jan 2014 03:34:20 +0000 (20:34 -0700)]
If the event loop exits due to an error and we are not logging I/O,
kill the command if still running.  Fixes a bug where sudo could
exit while the command was still running.

11 years agoWhen relocating preserved fds, start with the highest ones first
Todd C. Miller [Wed, 15 Jan 2014 03:20:26 +0000 (20:20 -0700)]
When relocating preserved fds, start with the highest ones first
to avoid moving fds around more than we have to.  Now uses a bitmap
to keep track of which fds are being preserved.  Fixes a bug where
the debugging fd could be relocated to the same fd as the error
backchannel temporarily, resulting in debugging output being printed
to the backchannel if util@debug was enabled.

11 years agoWhen restoring fds traverse list from high -> low, not low -> high
Todd C. Miller [Tue, 14 Jan 2014 21:22:04 +0000 (14:22 -0700)]
When restoring fds traverse list from high -> low, not low -> high
to avoid implicitly closing an fd we want to relocate.

11 years agoIf not logging I/O we may get EOF when the command is executed and
Todd C. Miller [Tue, 14 Jan 2014 17:54:56 +0000 (10:54 -0700)]
If not logging I/O we may get EOF when the command is executed and
the other end of the backchannel is closed.  Just remove the
backchannel event in this case or we will continue to receive
the event.  Bug #631

11 years agosync with translationproject.org
Todd C. Miller [Tue, 14 Jan 2014 16:26:14 +0000 (09:26 -0700)]
sync with translationproject.org

11 years agoFix strtonum() usage when parsing /proc/self/stat on Linux.
Todd C. Miller [Mon, 13 Jan 2014 18:11:26 +0000 (11:11 -0700)]
Fix strtonum() usage when parsing /proc/self/stat on Linux.
Bug #630

11 years agoUpdate for sudo 1.8.9p3
Todd C. Miller [Mon, 13 Jan 2014 18:09:00 +0000 (11:09 -0700)]
Update for sudo 1.8.9p3

11 years agoRemove dead store; found by cppcheck
Todd C. Miller [Mon, 13 Jan 2014 16:52:41 +0000 (09:52 -0700)]
Remove dead store; found by cppcheck

11 years agoQuiet a cppcheck warning about a negative subscript.
Todd C. Miller [Thu, 9 Jan 2014 00:03:06 +0000 (17:03 -0700)]
Quiet a cppcheck warning about a negative subscript.

11 years agoMake noexec parameter to sudo_execve() bool.
Todd C. Miller [Thu, 9 Jan 2014 00:02:22 +0000 (17:02 -0700)]
Make noexec parameter to sudo_execve() bool.

11 years agoQuiet a few innocuous cppcheck warnings.
Todd C. Miller [Thu, 9 Jan 2014 00:01:03 +0000 (17:01 -0700)]
Quiet a few innocuous cppcheck warnings.

11 years agoHandle in_res being NULL for sudo_debug_printf() in sudo_sss_filter_result().
Todd C. Miller [Wed, 8 Jan 2014 23:48:27 +0000 (16:48 -0700)]
Handle in_res being NULL for sudo_debug_printf() in sudo_sss_filter_result().

11 years agoWhen writing length to timing file, use %u not %d as it is unsigned.
Todd C. Miller [Wed, 8 Jan 2014 23:45:06 +0000 (16:45 -0700)]
When writing length to timing file, use %u not %d as it is unsigned.

11 years agoClose export_fp in the error path too, but do not close stdout.
Todd C. Miller [Wed, 8 Jan 2014 23:29:18 +0000 (16:29 -0700)]
Close export_fp in the error path too, but do not close stdout.

11 years agoMove right brace outside #ifdef HAVE_DISPCRYPT; found by cppcheck.
Todd C. Miller [Wed, 8 Jan 2014 23:23:06 +0000 (16:23 -0700)]
Move right brace outside #ifdef HAVE_DISPCRYPT; found by cppcheck.

11 years agoMake this compile again
Todd C. Miller [Mon, 13 Jan 2014 16:52:41 +0000 (09:52 -0700)]
Make this compile again

11 years agoAdd suppression line to quiet a bogus (inconclusive) cppcheck warning.
Todd C. Miller [Mon, 13 Jan 2014 16:52:41 +0000 (09:52 -0700)]
Add suppression line to quiet a bogus (inconclusive) cppcheck warning.

11 years agoDo not leak old istack if realloc fails; found by cppcheck.
Todd C. Miller [Mon, 13 Jan 2014 16:52:41 +0000 (09:52 -0700)]
Do not leak old istack if realloc fails; found by cppcheck.
Also modify yyless() to avoid a harmless cppcheck warning every
time it is used.

11 years agoAdd cppcheck target to run cppcheck on all source files.
Todd C. Miller [Mon, 13 Jan 2014 16:50:39 +0000 (09:50 -0700)]
Add cppcheck target to run cppcheck on all source files.

11 years agoUpdate for sudo 1.8.9p2
Todd C. Miller [Thu, 9 Jan 2014 22:25:51 +0000 (15:25 -0700)]
Update for sudo 1.8.9p2

11 years agoUpdate to libtool-2.4.2.418
Todd C. Miller [Thu, 9 Jan 2014 22:23:15 +0000 (15:23 -0700)]
Update to libtool-2.4.2.418

11 years agoUpdate from http://git.savannah.gnu.org/gitweb/?p=config.git
Todd C. Miller [Thu, 9 Jan 2014 22:23:13 +0000 (15:23 -0700)]
Update from http://git.savannah.gnu.org/gitweb/?p=config.git

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.