Todd C. Miller
c1db4b1546
Always include locale.h from gettext.h so we no longer need to
...
include locale.h from the .c files.
2012-11-11 20:23:53 -05:00
Todd C. Miller
595d3b2651
Display warning/error messages in the user's locale.
2012-11-08 15:37:44 -05:00
Todd C. Miller
a3a1574cdf
Explicitly mark main() as public in executables to avoid an HP-UX
...
ld warning.
2012-10-02 15:08:02 -04:00
Todd C. Miller
f808fead0a
Fall back on lstat(2) if d_type in struct dirent is DT_UNKNOWN.
...
Not all file systems support d_type. Bug #572
2012-09-17 13:20:30 -04:00
Todd C. Miller
37d70a999c
Avoid calling fclose(NULL) in the error path when we cannot open an
...
I/O log file.
2012-09-17 10:53:46 -04:00
Todd C. Miller
45fea137f9
Fix compilation on gcc 2.95 and other compilers that only allow
...
variable declarations at the beginning of a block.
2012-06-18 13:47:01 -04:00
Todd C. Miller
b406b51da0
No need to loop over atomic_writev(), it guarantees to write all
...
data or return an error.
Fix handling of stdout/stderr that contains "\r\n" and handle a
"\r\n" pair that spans a buffer.
2012-05-30 10:46:02 -04:00
Todd C. Miller
12be3e7f54
Instead of doing extra write()s when replaying stdout, build up a
...
vector for writev() instead. This results in far fewer system
calls.
2012-05-29 13:46:28 -04:00
Todd C. Miller
7a6cad5026
When replaying a log of stdout or stderr, do newline to carriage
...
return + linefeed conversion. We cannot have termios do this for
us since we've disabled output postprocessing (POST) when setting
raw mode.
2012-05-25 16:24:42 -04:00
Todd C. Miller
b0993d8777
If struct dirent has d_type, use it to avoid an extra stat().
2012-04-13 08:36:58 -04:00
Todd C. Miller
45fcc29dd6
Sort output of "sudoreplay -l"
2012-04-13 08:35:19 -04:00
Todd C. Miller
dffaeb9cb5
Fix duplicate free introduced in last rev
2012-04-12 15:17:00 -04:00
Todd C. Miller
5029c3cdce
Plug memory leak in parse_logfile() in the error path.
2012-04-09 09:14:53 -04:00
Todd C. Miller
7a6664e2e0
If I/O log file includes rows + cols, warn if the user's tty is
...
not big enough.
2012-04-06 16:37:40 -04:00
Todd C. Miller
ce8fd0ea39
Fix printing of TSID in "sudoreplay -l"
2012-04-06 16:34:43 -04:00
Todd C. Miller
ea2fd83b35
Undo an incorrect int -> bool conversion.
2012-03-28 10:51:22 -04:00
Todd C. Miller
55d1a1a79d
Use ecalloc() when allocating structs.
2012-03-19 11:24:24 -04:00
Todd C. Miller
ae43a19ad6
Enable debugging via sudo.conf.
2012-01-06 13:13:04 -05:00
Todd C. Miller
51e45647ae
Use HAVE_STRUCT_TIMESPEC and HAVE_STRUCT_IN6_ADDR instead of
...
HAVE_TIMESPEC and HAVE_IN6_ADDR respectively.
2011-12-01 11:07:17 -05:00
Todd C. Miller
65b781a2ef
Use SUDO_CONV_DEBUG_MSG in the plugin instead of writing
...
directly to the debug file.
2011-11-13 13:55:19 -05:00
Todd C. Miller
9923464d96
Wrap error/errorx and warning/warningx functions with debug statements.
...
Disable wrapping for standalone sudoers programs as well as memory
allocation functions (to avoid infinite recursion).
2011-10-22 14:28:33 -04:00
Todd C. Miller
3e2f4037cc
Quiet a compiler warning on some platforms.
2011-05-27 13:50:37 -04:00
Todd C. Miller
bf7e7b5752
Add gettext.h convenience header. This is similar to but distinct from
...
the one included with the gettext package.
2011-05-20 11:48:17 -04:00
Todd C. Miller
645b5c1c7e
Fix C format warnings.
2011-05-19 16:21:59 -04:00
Todd C. Miller
67cc4ff025
Translate help / usage strings.
2011-05-19 16:07:14 -04:00
Todd C. Miller
42a3966a88
Minor warning/error cleanup
2011-05-18 13:44:36 -04:00
Todd C. Miller
fce0b906eb
cannot -> "unable to" in warning/error messages
2011-05-18 12:41:06 -04:00
Todd C. Miller
c3a259f5ee
Add calls to bindtextdomain() and textdomain()
...
Currently there are two domains, one for the sudo front-end and
one for the sudoers plugin and its associated utilities.
2011-05-17 16:38:40 -04:00
Todd C. Miller
c234363562
Add missing includes of libintl.h.
2011-05-16 16:50:09 -04:00
Todd C. Miller
b643b190a7
Prepare sudoers module messages for translation.
2011-05-16 16:32:05 -04:00
Todd C. Miller
85e8e584ae
Add support for replaying sessions when iolog_file is set to something
...
other than %{seq}.
2011-03-04 20:10:44 -05:00
Todd C. Miller
59515a4a6d
add help text to sudo, visudo and sudoreplay for the -h option
2011-02-21 11:33:36 -05:00
Todd C. Miller
39d9feb438
The howmany macro lives in sys/sysmacros.h on SVR5 systems
...
Closes Bug 470
2011-02-19 08:23:46 -05:00
Todd C. Miller
4294650039
#include "foo.h", not <foo.h> for local includes.
2011-02-07 10:51:43 -05:00
Todd C. Miller
ae2f7638f5
standardize on "return foo;" rather than "return(foo);" or "return (foo);"
2011-01-24 15:15:18 -05:00
Todd C. Miller
f7f8b6867e
Update copyright year to 2011
2011-01-20 16:46:56 -05:00
Todd C. Miller
2fb085dfac
change an error() to errorx()
2010-12-30 17:02:43 -05:00
Todd C. Miller
d739608a80
missing.h should come before most local includes
2010-09-07 18:28:55 -04:00
Todd C. Miller
10c3bb62c4
Make local includes consistent; use double quotes for local includes
...
except for generated ones where we use angle brackets.
Also g/c unused compat.h.
2010-09-07 16:45:19 -04:00
Todd C. Miller
f454727bb8
Merge compat.h and missing.h into missing.h
2010-08-16 14:05:44 -04:00
Todd C. Miller
420db23714
Quiet gcc warnings on glibc systems that use warn_unused_result for
...
write(2) and others.
2010-08-03 11:17:56 -04:00
Todd C. Miller
5d06ad3b6b
Some getline() implementations (FreeBSD 8.0) do not ignore the
...
length pointer when the line pointer is NULL as they should.
2010-07-27 10:48:35 -04:00
Todd C. Miller
c33bf93509
Don't need to check for *cp being non-zero, isdigit() will do that.
2010-07-27 10:12:24 -04:00
Todd C. Miller
18d25e96f0
Add setlocale() so the command line arguments that use floating
...
point work in different locales. Since sudo now logs the timing
data in the C locale we must Parse the seconds in the timing file
manually instead of using strtod(). Furthermore, sudo 1.7.3 logged
the number of seconds with the user's locale so if the decimal point
is not '.' try using the locale-specific version.
2010-07-27 09:49:54 -04:00
Todd C. Miller
a3e4db1244
Use errorx() not error() for thingsthat don't set errno.
2010-07-27 07:50:43 -04:00
Todd C. Miller
d8acd34031
Add LINE_MAX define for those without it.
2010-07-20 15:34:30 -04:00
Todd C. Miller
30fe4a067c
Set usrinfo for AIX
...
Set adminstrative domain for the process when looking up user's
password or group info and when preparing for execve().
Include strings.h even if string.h exists since they may define
different things. Fixes warnings on AIX and others.
2010-06-29 13:08:05 -04:00
Todd C. Miller
ebc152ce8f
Check for zlib.h in addition to libz.
2010-06-16 16:51:46 -04:00
Todd C. Miller
1025a2ec06
Add -f (filter) option to sudoreplay to allow certain streams to
...
be replayed and others ignored.
2010-06-15 16:11:25 -04:00
Todd C. Miller
b72a530fd0
Update copyright year
2010-06-14 12:19:49 -04:00