Todd C. Miller
a51d194a73
Add test of multiple syntax errors.
...
Where possible, the portion of the line before the error should be
still be interpreted.
2020-09-02 12:40:39 -06:00
Todd C. Miller
2adde428c5
Fix path to check_exptilde.c
2020-09-02 09:20:19 -06:00
Todd C. Miller
9ff960457a
Add support for runchroot and runcwd to "sudo -l" and cvtsudoers.
2020-09-01 06:26:05 -06:00
Todd C. Miller
86513c78b6
Unit test for exptilde
2020-09-01 06:26:05 -06:00
Todd C. Miller
6bdfd010d2
Add CHROOT and CWD sudoers options.
...
Also matching runchroot and runcwd Defaults settings.
2020-09-01 06:26:00 -06:00
Todd C. Miller
ce97ca28db
Use OpenBSD-compatible freezero() in place of explicit_bzero() + free()
2020-08-10 19:24:33 -06:00
Todd C. Miller
cef6e3687e
Switch from memset_s() -> explicit_bzero().
...
memset_s() (and all of Annex K) is likely to be removed from the
a future version of the standard.
2020-08-10 19:24:32 -06:00
Todd C. Miller
38e28dcbf5
Rename python_plugin.exp.in -> python_plugin.exp
...
There is nothing dynamic in this file.
2020-08-03 10:15:28 -06:00
Todd C. Miller
3b4d4ab8dd
Add missing python_plugin.exp.in file and remove unneeded __dso_public
...
This fixes building the python plugin on systems where the compiler
doesn't support symbol hiding (but wherethe linker does).
2020-08-03 09:53:12 -06:00
Todd C. Miller
d4739533fd
Add regress test to catch swapids() bug when called by iolog_mkdtemp()
2020-06-18 15:14:00 -06:00
Todd C. Miller
d003da33dd
Romanian translation from translationproject.org.
2020-06-11 15:15:58 -06:00
Todd C. Miller
741c6f274e
Add support for @include and @includedir
...
These are less confusing than #include and #includedir when the
hash character is also the comment character.
This commit also adds real parsing of include directives as opposed
to the pure lexer approach used previously. As a result, it is now
possible to include files with spaces by either using a double-quoted
string or escaping the space characters with a backslash.
2020-05-20 13:10:53 -06:00
Todd C. Miller
83d1bee918
Rename sudo_parse_host_port -> iolog_parse_host_port and mv to lib/iolog
...
It is not used outside of the I/O log client and server and the
host:port syntax may change in the future.
2020-05-11 08:47:54 -06:00
Todd C. Miller
7f2585ed0a
Plumb in codespell with a "make spell" target.
2020-05-07 07:50:11 -06:00
Todd C. Miller
009876bf36
Refactor the sudoedit code to copy files so it can be shared.
...
The SELinux sudoedit code now extends the destination file the
same way the non-SELinux version does.
2020-04-21 11:05:32 -06:00
Todd C. Miller
0a10c702be
Split sudo_logsrvd and the python plugin into their own packages.
2020-04-07 14:03:58 -06:00
Todd C. Miller
ee868776de
Include all python plugin files in MANIFEST, not the directory itself.
2020-04-07 14:10:36 -06:00
Todd C. Miller
3cd9cbbadf
Add tests for the simple json parser.
2020-03-29 05:05:08 -06:00
Todd C. Miller
056173e572
Parse I/O JSON info file in JSON if present.
...
The JSON version includes more information than the original "log"
file in the I/O log dir.
2020-03-29 05:05:08 -06:00
Robert Manner
c039a99c10
plugins/python/sudo_module: add sudo.LogHandler
...
so python log system can be used with sudo logsystem.
Loggers use it by default (the handler is set on the root logger).
If that is not the intent, it can be overridden explicitly.
2020-02-28 05:46:54 -07:00
Todd C. Miller
e7bd19bd1e
Add test for #include directive without a trailing newline.
2020-02-14 14:13:55 -07:00
Robert Manner
80b3d86d6e
plugins/python: add python approval plugin example
2020-02-12 11:16:00 -07:00
Robert Manner
23af39b005
plugins/python: add python approval plugin wrapper
2020-02-12 11:16:00 -07:00
Todd C. Miller
9e2e79b6fa
Add regress test for parsing Defaults lists.
...
Currently only env_check, env_delete, env_keep and log_servers are lists.
2020-02-10 17:58:59 -07:00
Robert Manner
52d067b01f
plugins/python: add example python audit plugin
2020-02-10 05:24:16 -07:00
Robert Manner
cbf60cff5d
plugins/python: add python audit plugin wrapper
2020-02-10 05:24:16 -07:00
Todd C. Miller
2fe127d108
Move some scripts from the top level src dir to a scripts dir.
2020-02-06 14:30:26 -07:00
Todd C. Miller
aa1ca9c9ba
Add sample approval plugin that simply tests for "business hours"
2020-02-06 13:53:09 -07:00
Todd C. Miller
bf85ea2bf7
Example audit plugin that writes JSON output to a log file.
2020-01-30 13:25:52 -07:00
Todd C. Miller
88f9f2ba9a
Add a simple API for writing JSON records.
...
To be used by the upcoming JSON audit module.
2020-01-30 13:12:25 -07:00
Todd C. Miller
ed294b8283
Add code to generate universally unique identifiers.
...
We create type 4, variant 1 uuids (random).
2020-01-30 13:12:25 -07:00
Todd C. Miller
dc45c4d4ea
Add tests for arc4random_buf() and an implementation for those without.
2020-01-30 13:12:25 -07:00
Todd C. Miller
13cc65038f
Remove multi-thread support from arc4random.
...
Sudo is not multi-threaded so we don't need the added complexity.
2020-01-28 06:41:42 -07:00
Robert Manner
5da7bd562c
plugins/python/regress: adds tests for python plugin feature and examples
2020-01-20 06:30:20 -07:00
Todd C. Miller
5a86073bd0
Portability fixes and correct path to hostcheck.h in MANIFEST.
...
Include sys/socket.h for getpeername().
Link with -lnsl on Solaris to get inet_pton().
2020-01-18 11:32:45 -07:00
Laszlo Orban
8d111db602
implement host validation for the audit server SSL certificates
2020-01-18 05:49:54 -07:00
Todd C. Miller
5bf0752021
Substitute plugin dir into examples/sudo.conf
2020-01-02 12:53:30 -07:00
Todd C. Miller
c6f8f4b545
Move init.d and sudo.pp to the etc dir.
2019-12-23 14:29:27 -07:00
Todd C. Miller
4690d3ecf6
Add cfmakeraw() for systems without it.
2019-12-23 13:15:34 -07:00
Todd C. Miller
1b10ac03ea
Remove indent.pro from MANIFEST
2019-12-23 07:42:21 -07:00
Todd C. Miller
5dcc28180e
Add sudo_plugin_python manual page.
...
Based on markdown docs from Robert Manner.
2019-12-21 12:54:55 -07:00
Todd C. Miller
42732821fd
Add python module files to MANIFEST
2019-12-14 13:02:48 -07:00
Todd C. Miller
b14d633ec6
Add runas_check_shell flag to require a runas user to have a valid shell.
...
Not enabled by default.
2019-12-09 19:29:45 -07:00
Todd C. Miller
82237194dd
Add support for logging to the log server
2019-11-15 13:41:51 -07:00
Todd C. Miller
58cede6fee
Move protobuf-c.c, log_server.proto, log_server.pb-c.[ch] to lib/logsrv
2019-11-15 13:35:58 -07:00
Todd C. Miller
98ce89ee80
Add unit test for parse_host_port and make an empty port an error.
2019-11-05 06:04:13 -07:00
Todd C. Miller
b270b0c887
Split out code to parse host:port into a utility function.
2019-11-02 12:04:26 -06:00
Todd C. Miller
f1d0c99e03
Move bufsize_roundup() -> sudo_pow2_roundup() in libsudo_util.
2019-11-02 12:03:44 -06:00
Todd C. Miller
43df086186
Add dup3() emulation.
2019-11-02 10:52:55 -06:00
Todd C. Miller
fd9fa6bcaa
Regenerate Makefile and sort MANIFEST
2019-11-02 10:51:46 -06:00