Todd C. Miller
f5ac1317c4
Make sudo pass -Wmissing-prototypes
2022-06-27 12:48:03 -06:00
Todd C. Miller
322e0b3693
Return NOT_FOUND from the set_cmnd_path() stub since we don't set user_cmnd.
...
The purpose of set_cmnd_path() is to reset user_cmnd based on a new
runchroot. For the stub version we don't modify user_cmnd and so
must not return a status of FOUND.
Fixes oss-fuzz issue #31250 which only affected the fuzzer and not sudo.
2021-02-22 19:53:08 -07:00
Todd C. Miller
e0c2635fb3
Apply Google inclusive language guidelines.
...
Also replace backwards with backward.
2020-10-30 10:15:30 -06:00
Todd C. Miller
d899fe5936
Use real setters for the eventlog config.
...
This makes it possible to have a base config that the callers can
modify instead of replacing the config wholesale.
2020-10-26 16:10:42 -06:00
Todd C. Miller
4416bd5977
Use libeventlog in sudoers instead of doing our own logging.
2020-10-26 16:10:40 -06:00
Todd C. Miller
b6dbfe5094
Take the chroot into account when search for the command.
...
This could a a user-specific chroot via the -R option, a runchroot
Defaults value, or a per-command CHROOT spec in the sudoers rule.
2020-09-09 15:26:44 -06:00
Todd C. Miller
446ae3f507
Include string.h unconditionally and only use strings.h for strn?casecmp()
...
In the pre-POSIX days BSD had strings.h, not string.h.
Now strings.h is only used for non-ANSI string functions.
2020-05-18 07:59:24 -06:00
Todd C. Miller
dd88460800
We no longer need to include headers we don't use for sudo*.h files.
...
Previously we needed to include headers required by the various
sudo*h files. Now those files are more self-sufficient and we
should only include headers needed by code in the various .c files.
2020-05-18 06:47:04 -06:00
Todd C. Miller
486ee2b71f
debug_decl and debug_decl_vars now require a semicolon at the end.
2019-12-22 08:48:16 -07:00
Todd C. Miller
1e1ef61902
Add SPDX-License-Identifier to files.
2019-04-29 07:21:51 -06:00
Todd C. Miller
6c3d20cb41
Convert PVS-Studio comment to ANSI C.
2018-10-26 08:39:09 -06:00
Todd C. Miller
64e5d34c57
Add comments in .c files so PVS-Studio will check them.
2018-10-21 08:46:05 -06:00
Todd C. Miller
63321f19a9
Revert 04ec05108b2b, change the default input source back to stdin.
2018-01-28 16:11:02 -07:00
Todd C. Miller
98c19a68c9
Use the built-in sudoers file location as the default sudoers file
...
for cvtsudoers and move parse_sudoers_options() to stubs.c since
it is shared between visudo.c and cvtsudoers.c.
2018-01-26 13:15:10 -07:00
Todd C. Miller
0f3030d502
Move common stub functions required by the parser out of visudo.c
...
and cvtsudoers.c and into stubs.c.
2018-01-26 12:51:24 -07:00