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
238186abc9
Quiet a clang-analyzer dead store warning.
2012-03-26 11:03:23 -04:00
Todd C. Miller
55d1a1a79d
Use ecalloc() when allocating structs.
2012-03-19 11:24:24 -04:00
Todd C. Miller
35280a8437
Check the owner and mode in -c (check) mode unless the -f option
...
is specified. Previously, the owner and mode were checked on the
main sudoers file when the -s (strict) option was given, but this
was not documented.
2012-02-28 14:16:39 -05:00
Todd C. Miller
315b998a6d
For "visudo -c" also list include files that were checked when
...
everything is OK.
2012-01-11 16:25:39 -05:00
Todd C. Miller
efbf020d42
Use SUDO_DEBUG_ALIAS for alias checking functions.
2012-01-07 12:24:43 -05:00
Todd C. Miller
38526ca149
Enable debugging via sudo.conf.
2012-01-06 10:58:13 -05:00
Todd C. Miller
baa9273dd5
Allow "visudo -c" to work when we only have read-only access to the
...
sudoers include files.
2012-01-06 10:54:30 -05:00
Todd C. Miller
47bcaf57bc
parse_error is now bool, not int
2012-01-04 15:45:27 -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
21a1460d4c
Fix mode on sudoers as needed when the -f option is not specified.
2011-11-30 15:33:26 -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
09beba8259
Revert 003bdb078a15. We need to #include <gram.h> not "gram.h" and
...
<def_data.h> and not "def_data.h" when generating the parser in a
build dir.
2011-11-12 12:18:44 -05:00
Todd C. Miller
0bf68d2103
#include "gram.h" not <gram.h> and "def_data.h" and not <def_data.h>.
2011-11-08 14:09:48 -05:00
Todd C. Miller
922add7801
Make alias_remove_recursive() return TRUE/FALSE as its callers
...
expect and remove two unused arguments. Fixes bug 519.
2011-10-26 10:42:30 -04: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
f730cb7873
Assume all modern systems support fstat(2).
2011-08-31 11:19:10 -04:00
Todd C. Miller
e3cda80202
Don't assume all editors support the +linenumber command line argument,
...
use a whitelist of known good editors.
2011-08-26 14:03:49 -04:00
Todd C. Miller
d81c14005f
Silence compiler warnings on Solaris with gcc 3.4.3
2011-08-23 16:42:18 -04:00
Todd C. Miller
5b7e231dd3
When checking aliases, also check the contents of the alias in case there
...
are problems with an alias that is referenced inside another.
Replace the self reference check with real alias cycle detection.
2011-05-25 13:04:13 -04:00
Todd C. Miller
682333ae2d
Increment alias_seqno before calls to alias_remove_recursive() to
...
avoid false positives with the alias loop detection. Fixes spurious
warnings about unused aliases when they are nested.
2011-05-25 11:31:11 -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
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
6f8cd91928
can't -> "unable to" in warning/error messages
2011-05-18 12:36:26 -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
f1078bd28e
Keep track of sudoers grammar version and report it in the -V output.
2011-04-05 11:47:31 -04:00
Todd C. Miller
53da5e8cdf
Update copyright years.
2011-03-11 15:34:35 -05:00
Todd C. Miller
f5e356ed40
If we are killed by a signal, display the name of the signal that got us.
2011-03-04 16:12:40 -05:00
Todd C. Miller
95512ae05e
No longer need sudo_getepw() stubs.
2011-03-04 08:08:22 -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
ae2f7638f5
standardize on "return foo;" rather than "return(foo);" or "return (foo);"
2011-01-24 15:15:18 -05:00
Todd C. Miller
51f401fa34
Add prototype for cleanup()
2010-11-19 12:58:03 -05:00
Todd C. Miller
1e01f2b7ac
Quiet an HP-UX compiler warning.
2010-10-12 09:23:52 -04:00
Todd C. Miller
f601085de4
Make "visudo -c -f -" check the standard input.
2010-09-09 17:10:23 -04:00
Todd C. Miller
e069b74dc8
Convert sudoers plugin to use interface list passed in settings.
2010-09-08 15:07:40 -04:00
Todd C. Miller
6bcd9efc0c
Use gettimeofday() directly instead of via the gettime() wrapper.
2010-08-10 13:50:40 -04:00
Todd C. Miller
8dd8aa000e
Remove some obsolete configure tests, ancient Unix systems are no
...
longer supported.
2010-08-10 13:44:05 -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
32e896f339
Treat an unknown defaults entry as a parse error.
2010-07-19 12:53:45 -04:00
Todd C. Miller
e6b48d415c
Replace built-in non-unix group support with a sudoers group plugin.
...
Include a sample plugin that can read Unix-format group files.
2010-07-02 11:11:25 -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
b72a530fd0
Update copyright year
2010-06-14 12:19:49 -04:00
Todd C. Miller
3516d7f0e3
Remove tfd from struct sudoersfile; it is not used.
...
Add prev pointer to struct sudoersfile.
Declare list of sudoersfile using TQ_DECLARE.
Use tq_append to append sudoers entries to the tail queue.
2010-06-11 09:53:44 -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
be3b7d615a
Fix typo in ternary operator usage.
2010-06-01 09:44:54 -04:00
Todd C. Miller
1a217bcc22
Use setprogname() as needed.
2010-05-30 06:35:21 -04:00
Todd C. Miller
34e1a06767
Use sudo_printf to display verbose version information.
2010-05-28 12:01:06 -04:00