Todd C. Miller
39acd2fcba
Rename error/errorx -> fatal/fatalx and remove the exit value as
...
it was always 1.
2013-04-18 14:07:59 -04:00
Todd C. Miller
fbcff81cdc
Print test failures to stdout like the final count so the outputis
...
not displayed out of order.
2013-04-18 10:44:06 -04:00
Todd C. Miller
e91e30b4b2
Simple bas64 decode unit test.
2013-04-17 12:54:33 -04:00
Todd C. Miller
35375a2b7e
Initial implementation of checksum support in sudoers.
...
Currently supports SHA-224, SHA-256, SHA-384, SHA-512.
TODO: checksum format validation in parser and base64 support.
checksum support for ldap sudoers
2013-04-14 07:00:21 -04:00
Todd C. Miller
e17267b5e1
Use group -1 instead of 1 as the invalid group since the running
...
user might have group 1 as their default group.
2013-04-05 08:17:19 -04:00
Todd C. Miller
46db7a20e4
Pass in expected gid to testsudoers in addition to the uid that
...
matches the test sudoers files.
2013-04-02 09:25:51 -04:00
Todd C. Miller
d482b00ec1
No longer need to declare interfaces
2013-03-28 14:25:09 -04:00
Todd C. Miller
155669cfe4
No longer need to define sudo_printf
2013-03-28 13:40:20 -04:00
Todd C. Miller
2f86c1c092
Add explicit "exit 0" to prevent the check target from ending
...
prematurely.
2013-03-18 16:11:24 -04:00
Todd C. Miller
c2e678d73a
Add regress test for bug 361
2013-01-24 11:57:38 -05:00
Todd C. Miller
db7ea4123a
Add test for visudo cycle check core dump; test case from Daniel Kopecek
2013-01-23 08:24:11 -05:00
Todd C. Miller
652d0de98a
Remove errant file.
2012-12-07 14:58:06 -05:00
Todd C. Miller
3391038d49
Remove obsolete sudoers_cleanup() stubs.
2012-12-04 10:41:59 -05:00
Todd C. Miller
1d7072fe09
Don't include <sys/param.h>. We only needed it for MAXPATHLEN,
...
MAXHOSTNAMELEN and the MIN/MAX macros. We now use PATH_MAX and
HOST_NAME_MAX throughout without falling back on MAXPATHLEN or
MAXHOSTNAMELEN and define our own MIN/MAX macros as needed.
2012-12-04 10:40:47 -05:00
Todd C. Miller
c2c6616a0c
Move _sudo_printf from src/conversation.c to common/sudo_printf.c.
...
Add sudo_printf function pointer that is initialized to _sudo_printf()
instead of requiring a sudo_conv function pointer everywhere. The
plugin will reset sudo_printf to point to the version passed in via
the plugin open function. Now plugin_error.c can just call sudo_printf
in all cases. The sudoers binaries no longer need their own version
of sudo_printf.
2012-11-25 09:34:33 -05:00
Todd C. Miller
4bde57b8b2
Rename warning2()/error2() -> warning_nodebug()/error_nodebug().
2012-11-25 09:34:10 -05:00
Todd C. Miller
cca915e39b
Bash doesn't let you set UID to use MYUID instead.
2012-11-25 08:12:55 -05:00
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
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
5276ab3a5f
Set yacc prefix to "sudoers" to avoid conflicts other yacc parsers.
2012-09-14 16:19:25 -04:00
Todd C. Miller
ac4b21b3e2
Remove generated file and change path for temporary include file.
2012-08-23 14:57:57 -04:00
Todd C. Miller
a49238e3f1
Don't check for errorx as an exported symbols as it is now a macro.
...
Check for user_in_group() instead.
2012-06-20 09:38:25 -04:00
Todd C. Miller
86cececc16
Add check for exported local symbols. This will cause a "make
...
check" failure on systems where we don't support symbol hiding.
2012-06-18 10:21:01 -04:00
Todd C. Miller
2a83d1c6d5
Add regress test for symbol visibility.
2012-06-17 20:23:21 -04:00
Todd C. Miller
203abd98b9
Use the expanded io log dir when updating the sequence number.
...
Includes a workaround for older versions of sudo where the
sequence number was stored in the unexpanded io log dir.
2012-06-15 12:33:12 -04:00
Todd C. Miller
ca9331d498
Add tests for sudoers mode, owner and group checks.
2012-05-21 15:39:24 -04:00
Todd C. Miller
4f296fe211
Add basic tests for #include and #includedir
2012-05-18 14:29:55 -04:00
Todd C. Miller
b58c1ff6ec
Fix "make check" fallout from the sudo_conv changes in sudo_debug.
2011-12-02 11:35:22 -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
a83507ccd1
Tests for empty sudoers (should parse OK) and syntax errors within
...
a line (should report correct line number) both with and without
the trailing newline.
2011-11-06 17:04:55 -05:00
Todd C. Miller
9fddb9eed7
Print line number when there is a parser error.
2011-11-06 17:00:40 -05:00
Todd C. Miller
c55b5c9e18
Add regress test for bugzilla 519
2011-10-26 10:20:32 -04:00
Todd C. Miller
300265019f
Disable warning/error wrapping in regress tests.
2011-10-26 10:19:48 -04:00
Todd C. Miller
0cd4648093
Only print individual check status when there is a failure.
2011-08-29 14:53:47 -04:00
Todd C. Miller
f478f84066
Add calls to setprogname() for test programs.
2011-08-29 14:51:12 -04:00
Todd C. Miller
1a259de176
Split out address matching into its own file and add regression
...
tests for it.
2011-08-29 14:10:18 -04:00
Todd C. Miller
bfc84b01f3
Fix expansion of strftime() escapes in log_dir and add a regress test
...
that exhibited the problem.
2011-08-18 13:41:40 -04:00
Todd C. Miller
f90731596a
Split out log file word wrap code into its own file and add unit
...
tests. Fixes an off-by one in the word wrap when the log line
length matches loglinelen.
2011-07-11 15:22:25 -04:00
Todd C. Miller
2af2174092
Correct sizeof() to fix test failure.
2011-04-11 11:41:38 -04:00
Todd C. Miller
0e2d58863a
Use group bin in test, not wheel as most systems have the bin group
...
but the same is no longer true of wheel.
2011-03-31 12:54:17 -04:00
Todd C. Miller
8b9d773bae
Add runasgroup support to testsudoers
2011-03-29 14:40:07 -04:00
Todd C. Miller
353f31751d
Avoid a NULL deref on unrecognized escapes.
...
Collapse %% -> % like strftime() does.
2011-03-28 12:54:41 -04:00
Todd C. Miller
b485739edd
Add test for a newline in the middle of a string when no line continuation
...
character is used.
2011-03-27 17:22:02 -04:00
Todd C. Miller
e9f89d7964
Update to match change in input.
2011-03-24 11:15:11 -04:00
Todd C. Miller
c5cc89da15
An empty group or netgroup should be a syntax error.
2011-03-24 11:00:05 -04:00
Todd C. Miller
5438a0be6a
Check that uids work in per-user and per-runas Defaults
...
Check that uids and gids work in a Command_Spec
2011-03-24 10:40:03 -04:00
Todd C. Miller
bc333ae448
Test empty string in User_Alias and Command_Spec
2011-03-24 10:39:25 -04:00
Todd C. Miller
0a4c000854
Add test for line continuation and aliases
2011-03-21 15:21:51 -04:00
Todd C. Miller
830fce0f19
Move parser tests to sudoers directory and test the tokenizer output too.
2011-03-21 15:08:49 -04:00
Todd C. Miller
b7487ae489
Add check for whitespace when a User_List is used for a per-user
...
Defaults entry.
2011-03-17 16:33:11 -04:00