Commit Graph

7180 Commits

Author SHA1 Message Date
Todd C. Miller
27598bc0ab Update copyright year. 2014-01-07 10:43:31 -07:00
Todd C. Miller
f57beb1afa 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.
2014-01-07 10:35:56 -07:00
Todd C. Miller
1bd6943624 Use debug_return_int() instead of bare return for debugging support. 2014-01-07 09:30:28 -07:00
Todd C. Miller
5a6d211d67 Fix infinite loop that could be triggered by sudo_ev_loopbreak()
and sudo_ev_loopcontinue().
2014-01-06 11:20:38 -07:00
Todd C. Miller
d3fd43fd2b Update for 1.8.9 final. 2014-01-06 10:15:05 -07:00
Todd C. Miller
0e1d726aac Handle a sequence file with no trailing newline. 2014-01-04 12:42:34 -07:00
Todd C. Miller
391bc02e25 Truncate io log and timing files on open when recycling them.
Only an issue when the sequence number wraps around.
2014-01-03 18:28:07 -07:00
Todd C. Miller
6fe419423a Repair reading of the iolog sequence number that got broken when
adding stricter strtoul() checks.
2014-01-03 18:11:27 -07:00
Todd C. Miller
d013b23ce3 If invoked as sudoedit we can't just exec the command directly since
the temporary files need to be updated before sudo exits.
2014-01-03 16:41:25 -07:00
Todd C. Miller
38bf95a767 Fix restoration of the close-on-exec flag when moving a relocated
fd back into its original position.
2014-01-03 14:34:14 -07:00
Todd C. Miller
ed029f9a69 Add "see below" to reference "Secure editing" section in "Preventing
shell escapes".
2014-01-02 10:40:03 -07:00
Todd C. Miller
9bbf4c7285 Add initial "Secure editing" section. 2014-01-01 07:07:37 -07:00
Todd C. Miller
76fb023903 Update copyright year. 2014-01-01 07:07:21 -07:00
Todd C. Miller
929d8a38ea sync with translationproject.org 2013-12-31 16:23:44 -07:00
Todd C. Miller
1943396d75 Make user_cwd and user_tty dynamically allocated even for the
"unknown" case.
2013-12-31 15:58:52 -07:00
Todd C. Miller
483e6972f6 Use -fstack-protector-strong in preference to -fstack-protector-all
or -fstack-protector.
2013-12-30 08:49:34 -07:00
Todd C. Miller
cd77926e1b Dell acquired Quest 2013-12-30 08:26:58 -07:00
Todd C. Miller
42dbe7f4bd sync with translationproject.org 2013-12-29 09:12:23 -07:00
Todd C. Miller
72cd57dea3 sync with translationproject.org 2013-12-28 18:40:15 -07:00
Todd C. Miller
11babdaabc regen 2013-12-28 14:28:52 -07:00
Todd C. Miller
bb87b3abf9 Update for recent changes. 2013-12-28 14:23:30 -07:00
Todd C. Miller
a6e1766dd6 Fix typo; we want setlocale(LC_ALL, "") since we are setting the
locale for the first time.
2013-12-28 07:59:45 -07:00
Todd C. Miller
91db1efe91 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.
2013-12-27 06:50:06 -07:00
Todd C. Miller
4d80e7cea4 Redo preserve_fds support to remap high fds so we can get the most
out of closefrom().  The fds are then restored after closefrom().
2013-12-24 15:01:00 -07:00
Todd C. Miller
76544011ed Fix install-plugin when sudoers is compiled statically. 2013-12-24 14:50:28 -07:00
Todd C. Miller
1adeda54ef Add support for preventing fds from getting clobbered by closefrom(). 2013-12-20 11:14:32 -07:00
Todd C. Miller
388ad69f09 regen 2013-12-19 16:44:05 -07:00
Todd C. Miller
291f88d2bc Need to include limits.h here too. 2013-12-18 15:01:04 -07:00
Todd C. Miller
eb44a5ba5c No need to use __signed. 2013-12-17 16:08:18 -07:00
Todd C. Miller
a0204080ee Need limits.h here too. 2013-12-17 16:02:32 -07:00
Todd C. Miller
a18395a90e Still need limits.h here. 2013-12-17 14:32:24 -07:00
Todd C. Miller
0cfe027b5f regen 2013-12-17 10:48:20 -07:00
Todd C. Miller
aa849ed945 Go back to using /proc/self/fd instead of /proc/$$/fd as only AIX
lacks /proc/self and it has F_CLOSEM.
2013-12-17 07:38:20 -07:00
Todd C. Miller
65012dd661 Use a switch to map digest type to name instead of an array of
strings.
2013-12-16 17:00:17 -07:00
Todd C. Miller
1c3f2ac1e7 Use /dev/fd in closefrom() on FreeBSD < 8.0 and Mac OS X. 2013-12-16 16:24:02 -07:00
Todd C. Miller
8c184dcec3 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.
2013-12-16 14:53:27 -07:00
Todd C. Miller
f689a86354 Remove _MAX and _MIN defines that any system from the last 20 years
should have.  Add ULLONG_MAX in case it is missing.
2013-12-16 14:52:31 -07:00
Todd C. Miller
68f6e23b07 Change visudo -x to take a file name argument, which may be '-' to
write the exported sudoers file to stdout.
2013-12-16 14:32:42 -07:00
Todd C. Miller
b2c456341a Move symbol extern defs into sudoers.h 2013-12-16 14:18:42 -07:00
Todd C. Miller
624f4fdb13 Add missing sudo_util.h 2013-12-16 14:14:36 -07:00
Todd C. Miller
cf47b156fc 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.
2013-12-14 08:30:37 -07:00
Todd C. Miller
62b559db15 Rename libcommon libsudo_util 2013-12-13 07:46:05 -07:00
Todd C. Miller
3e2d818ed9 Move prototypes for functions provided by libcommon that don't have
their own header files into sudo_util.h.
2013-12-12 18:29:07 -07:00
Todd C. Miller
ef2cff1d33 Now that we have proper number parsing functions we should store
T_UINT defaults values as unsigned int, not int.
2013-12-11 14:43:04 -07:00
Todd C. Miller
3e4f5c5848 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.
2013-12-11 14:31:50 -07:00
Todd C. Miller
03b013ab26 Regen after string parsing changes. 2013-12-11 13:55:12 -07:00
Todd C. Miller
cbf41b8b96 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().
2013-12-11 13:43:10 -07:00
Todd C. Miller
d83bfb9fe6 Add atomode() function for parsing a file mode. 2013-12-10 16:56:54 -07:00
Todd C. Miller
8f9ce7249a Use strtonum() instead of atoi(), strtol() or strtoul() where possible. 2013-12-10 16:23:21 -07:00
Todd C. Miller
f83eac40eb Add strtonum.c to compat for simpler number parsing. 2013-12-10 14:38:52 -07:00