Commit Graph

109 Commits

Author SHA1 Message Date
Todd C. Miller
6f6b0dec6c Use gcc's visibility attribute to specify when symbols are visible
or hidden, if available.  If not available, use an ELF version
script if it is supported.  If all else fails, fall back to using
libtool's -export-symbols.
2012-06-13 14:01:16 -04:00
Todd C. Miller
f3ab15b117 typo fix in comment 2012-04-19 11:49:18 -04:00
Todd C. Miller
aecb5206e2 Fix compiler warnings on some platforms and provide a better method
of defeating gcc's warn_unused_result attribute.
2012-03-29 10:33:40 -04:00
Todd C. Miller
e3e2397cba Quiet a compiler warning on some platforms. 2012-03-28 13:17:11 -04:00
Todd C. Miller
44ce5720de Remove the NO_EXIT flag to log_error() and add a log_fatal() function
that exits and is marked no_return.  Fixes false positives from
static analyzers and is easier for humans to read too.
2012-03-26 10:59:14 -04:00
Todd C. Miller
a16dee915b Add support for plugin args at the end of a Plugin line in sudo.conf.
Bump the minor number accordingly and update the documentation.  A
plugin must check the sudo front end's version before using the
plugin_args parameter since it is only supported for API version
1.2 and higher.
2012-03-02 11:04:09 -05:00
Todd C. Miller
3da971ba33 Better debug subsystem usage 2012-02-02 11:28:33 -05:00
Todd C. Miller
373043b4db Initialize the debug framework from the I/O plugin too. 2012-01-09 11:00:59 -05:00
Todd C. Miller
21a2f95821 Use stdbool.h instead of rolling our own TRUE/FALSE macros. 2011-12-02 11:27:33 -05:00
Todd C. Miller
839919566e Add debug_decl/debug_return (almost) everywhere.
Remove old sudo_debug() and convert users to sudo_debug_printf().
2011-10-22 14:40:21 -04:00
Todd C. Miller
8513c48185 Add missing space between command name and the first command line argument. 2011-05-27 14:07:23 -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
7960bde2db Minor warning/error message cleanup 2011-05-18 13:04:24 -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
b643b190a7 Prepare sudoers module messages for translation. 2011-05-16 16:32:05 -04:00
Todd C. Miller
383aef00b1 Log the TSID even if it is not a simple session ID. 2011-03-11 12:11:05 -05:00
Todd C. Miller
af2ac7ccc6 Use a char array to map a number to a base36 digit. 2011-02-01 14:54:08 -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
755e3ef0ab mkdir_iopath() returns size_t now that it uses strlcpy() and not snprintf() 2010-12-30 18:08:09 -05:00
Todd C. Miller
7f580397e2 Trim leading slashes from iolog_file and trailing slashes from iolog_dir 2010-12-30 18:05:53 -05:00
Todd C. Miller
25036d7a75 Pass a single I/O log file name in command_details instead of
separate dir + file parameters.
2010-12-30 17:09:01 -05:00
Todd C. Miller
83de9e28f1 Add missing cwd line to I/O log info file that got dropped when
iolog_deserialize_info() was added
2010-12-30 17:01:41 -05:00
Todd C. Miller
fec059a890 Avoid relying on globals filled in by the sudoers policy module for
the sudoers I/O log module.  The I/O log open function now pulls the
bits it needs out of user_info and command_info.
2010-12-29 17:32:04 -05:00
Todd C. Miller
97b7ae8892 If no iolog file is specified by the policy plugin, use io_nextid()
to determine the next file in the sequence.
2010-12-29 11:07:45 -05:00
Todd C. Miller
02ed3d5b3e Add support for the iolog_compress variable in command_info. 2010-12-28 12:23:18 -05:00
Todd C. Miller
bff14f60e6 Add sigsetjmp() calls to all plugin entry points just to be safe. 2010-12-28 11:02:12 -05:00
Todd C. Miller
4c1aecd48f Only use mkdtemp() if the path ends in at least 6 Xs since otherwise
glibc mkdtemp() returns EINVAL.
2010-12-27 12:32:28 -05:00
Todd C. Miller
fba58fa3f7 Allow sudoers to specify the iolog file in addition to the iolog dir.
Add escape sequence support to iolog file and dir: sequence number,
    user, group, runas_user, runas_group, hostname and command in
    addition to any escape sequence recognized by strftime(3).
2010-12-27 12:18:32 -05:00
Todd C. Miller
524021a377 Add missing sigsetjmp() call in I/O plugin open function.
Fixes a crash when the I/O plugin calls error(), errorx() or log_error().
2010-12-27 11:24:47 -05:00
Todd C. Miller
5d59c10b95 Give the policy module fine-grained control over what the I/O plugin
logs.
2010-12-21 17:43:18 -05:00
Todd C. Miller
a10f216797 Adapt plugins to version I/O logging ABI 1.1 2010-12-20 16:28:20 -05:00
Todd C. Miller
b2a6984606 Make I/O log dir configurable. 2010-12-10 14:14:35 -05: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
d69e4fd42b Add a cast to quiet a compiler warning. 2010-06-18 18:45:43 -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
fdd4805438 Remove an XXX 2010-06-15 17:00:42 -04:00
Todd C. Miller
1fbb1819e7 Use sudo_printf for I/O log version
Clarify policy plugin version string
2010-06-10 14:24:06 -04:00
Todd C. Miller
9b4203606d In sudoers_io_close(), skip NULL io_fds[] elements. 2010-06-08 16:57:18 -04:00
Todd C. Miller
79f178923e Replace timerfoo macros with timevalfoo since the timer macros are known
to be busted on some systems.
2010-06-08 18:38:23 -04:00
Todd C. Miller
6f05b565c3 Add use_pty sudoers option to force use of a pty even when not logging I/O. 2010-06-08 11:25:33 -04:00
Todd C. Miller
3aad381186 Add #define for maximum session id 2010-06-07 18:53:58 -04:00
Todd C. Miller
38138e7d13 Only use I/O input log file if def_log_input is set and output file
if def_log_output is set.
2010-06-06 11:54:46 -04:00
Todd C. Miller
fe57232226 Remove redundant tty signal blocking in log function. 2010-06-04 08:56:39 -04:00
Todd C. Miller
4a7fc9a824 Place static keyword where it belongs 2010-06-03 13:13:42 -04:00
Todd C. Miller
2dd29bf64d Break sudoers transcript feature up into log_input and log_output. 2010-05-30 10:31:38 -04:00
Todd C. Miller
0e2d33b5fc Adapt sudoreplay to iolog changes. 2010-05-30 06:29:41 -04:00
Todd C. Miller
e51fd3ab72 Log all input and output into separate files and store a number on
each timing file line to indicate which file the data is in.
2010-05-29 19:44:33 -04:00
Todd C. Miller
b6f02f38c0 Make sudoers_io functions static to iolog.c 2010-05-29 10:43:34 -04:00