Commit Graph

9661 Commits

Author SHA1 Message Date
Todd C. Miller
16b3513a95 Fix Coverity CID 204355, resource leak on error path. 2019-10-24 20:04:32 -06:00
Todd C. Miller
822fd99b60 Fix Coverity CID 204353, fd leak on error path. 2019-10-24 20:04:32 -06:00
Todd C. Miller
e74134d04d Fix some warnings from the clang static analyzer. 2019-10-24 20:04:32 -06:00
Todd C. Miller
728ed2100b Rename buffer.c -> logsrv_util.c and add iolog_seekto() 2019-10-24 20:04:32 -06:00
Todd C. Miller
b58ecb7e6d Move read_timing_record() into libsudo_iolog 2019-10-24 20:04:32 -06:00
Todd C. Miller
0ab2d8299b Fix client side of restart.
Seek to the target point there too so we start sending from the right place.
2019-10-24 20:04:32 -06:00
Todd C. Miller
3394785f6d Add restart support for compresses I/O logs. 2019-10-24 20:04:32 -06:00
Todd C. Miller
b57054785f Add manual pages for logsrvd and sendlog. 2019-10-24 20:04:32 -06:00
Todd C. Miller
66fc926959 Allow messages up to 2Mb in size. 2019-10-24 20:04:32 -06:00
Todd C. Miller
c25b6dc7ec Add OpenBSD malloc options. 2019-10-24 20:04:32 -06:00
Todd C. Miller
76eec78a33 Add basic support for event logging using a sudo-style log format. 2019-10-24 20:04:32 -06:00
Todd C. Miller
402820e8cf Convert sudo_logsrvd.conf to ini file format 2019-10-24 20:04:32 -06:00
Todd C. Miller
c7f0f9e0fc Return an error to the client on error instead of dropping the connection. 2019-10-24 20:04:32 -06:00
Todd C. Miller
216747476f Add long option support to logsrvd and sendlog. 2019-10-24 20:04:32 -06:00
Todd C. Miller
af7f65fdfd Mark logsrvd and sendlog strings for translation in the sudoers domain 2019-10-24 20:04:32 -06:00
Todd C. Miller
534aba7a3e Make the logsrvd port and list address configurable. 2019-10-24 20:04:32 -06:00
Todd C. Miller
077e9aebbf Rename ExecMessage -> AcceptMessage and add RejectMessage 2019-10-24 20:04:31 -06:00
Todd C. Miller
2e2d9e8694 Add sudo_ prefix to logsrvd and sendlog. 2019-10-24 20:04:31 -06:00
Todd C. Miller
282263c113 Use openat(2) when opening files in the I/O log directory. 2019-10-24 20:04:31 -06:00
Todd C. Miller
7ba7c5835e Enable sudo_logsrvd.conf settings. 2019-10-24 20:04:31 -06:00
Todd C. Miller
059b55ce72 Refactor code in sudoers that creates I/O log files to share with logsrvd. 2019-10-24 20:04:31 -06:00
Todd C. Miller
e0c9a9dfa3 Move mkdir_parents to libsudo_util. 2019-10-24 20:04:31 -06:00
Todd C. Miller
a808dd45c2 Add config file support for logsrvd 2019-10-24 20:04:31 -06:00
Todd C. Miller
240d589136 Command line option processing for logsrvd 2019-10-24 20:04:31 -06:00
Todd C. Miller
e76d2e8201 Add support for restarting I/O log transfers. 2019-10-24 20:04:30 -06:00
Todd C. Miller
8a16e62a88 Import protobuf-c source since to avoid an external dependency.
The files generated with protoc-c are not standalone.
We need to include protobuf-c.c and protobuf-c.h from the protobuf-c
distribution too.  Building protoc-c requires a relative recent
version of gcc which limits its portability.
2019-10-24 20:04:30 -06:00
Todd C. Miller
706553f9d3 Add debugging for logsrvd and sendlog 2019-10-24 20:04:30 -06:00
Todd C. Miller
0d69de5b25 Move openat() emulation to lib/util and at unlinkat() emulation. 2019-10-24 20:04:30 -06:00
Todd C. Miller
4dacf81082 Refactor I/O log code so it can be shared between sudoers and logsrvd 2019-10-24 20:04:29 -06:00
Todd C. Miller
2272430716 Import proof of concept sudo log server. 2019-10-24 20:04:29 -06:00
Todd C. Miller
aa99594575 Avoid invalid read when minval > maxval 2019-10-24 18:35:45 -06:00
Todd C. Miller
271ead2fd3 Don't pass an invalid session or process group ID to the plugin.
Fixes a regression in 1.8.28 when there is no terminal session leader.
2019-10-23 12:47:44 -06:00
Todd C. Miller
0375eaca58 regen 2019-10-21 19:55:08 -06:00
Todd C. Miller
5391ee2d5e Not all systems support RLIMIT_NPROC and RLIMIT_RSS 2019-10-21 16:03:10 -06:00
Todd C. Miller
8ea71f9ae0 Sudo 1.8.29 2019-10-21 14:57:24 -06:00
Todd C. Miller
b157b96893 Add depend target to all Makefile.in files. 2019-10-21 15:20:21 -06:00
Todd C. Miller
e80079eaa8 Set resource limits in the sudo process to unlimited.
We don't want sudo to be limited by the caller's resource limits.
The original resource limits are restore before session setup.
2019-10-21 11:41:48 -06:00
Todd C. Miller
f57e2d04a3 Older FreeBSD needs sys/param.h included before sys/user.h.
From Darren Tucker
2019-10-20 19:18:27 -06:00
Todd C. Miller
c3ce3a84fb Refer to user-ID and group-ID instead of "user ID" and "group ID" 2019-10-19 14:26:41 -06:00
Todd C. Miller
40bf4081be Rename sudo_strtoid() to sudo_strtoidx() and add simplified sudo_strtoid() 2019-10-20 10:21:29 -06:00
Todd C. Miller
6260bf60b4 sudoedit doesn't create a new PAM session so PAM umask does not apply. 2019-10-18 06:43:33 -06:00
Todd C. Miller
b02851dcf3 Change how the umask is handled with PAM and login.conf.
If the umask is explicitly set in sudoers, use that value regardless
of what is in PAM or login.conf.  If using the default umask from
sudoers, allow PAM or login.conf to override it.  Bug #900
2019-10-18 06:20:27 -06:00
Todd C. Miller
cf6c60c102 Add log_allowed and log_denied sudoers flags, defaulting to true. 2019-10-17 13:43:04 -06:00
Todd C. Miller
4229dfc566 Enable security auditing malloc options for "make check". 2019-10-17 13:41:53 -06:00
Todd C. Miller
8761217f83 Be more consistent with how we talk about sudoers Defaults settings.
Use "flag" not "option" when referring to boolean flags.
Use "setting" in place of "Defaults setting" in most places.
Use "the foo option" instead of "sudo's foo option" for command line options.
2019-10-16 14:29:12 -06:00
Todd C. Miller
cf2f37136f No need to check existing sudoers file when installing to DESTDIR
This check can cause problems on systems where /etc/sudoers.d is not readable.
2019-10-16 12:17:06 -06:00
Todd C. Miller
43e44a9982 Inclue sudo_util.h to get sudo_strtonum() prototype. 2019-10-16 11:12:11 -06:00
Todd C. Miller
f5a7585a4f strtonum -> sudo_strtonum 2019-10-16 11:04:09 -06:00
Todd C. Miller
d5ea5b7fbc Add split out strtofoo tests. 2019-10-16 10:21:05 -06:00
Todd C. Miller
1037b685eb Make sure we don't go past the end of the string when out of range. 2019-10-16 10:08:33 -06:00