Commit Graph

12802 Commits

Author SHA1 Message Date
Todd C. Miller
145faa3fe9 Updated translations from translationproject.org 2023-10-30 16:25:36 -06:00
Renato Botelho
75e829b740 Add missing sudoers_context to verify_krb_v5_tgt()
Commit 2440174954 added ctx variable to log_warningx() call but that
variable was not declared in that context, breaking the build.
2023-10-31 07:50:45 -06:00
Todd C. Miller
5f3a6b4f6a Mention new Indonesian translation and sudo_logsrvd fd limit change. 2023-10-23 10:19:28 -06:00
Todd C. Miller
31bcdec232 Set the open file descriptor limit to the maximum allowed value.
Each connection can require up to 9 descriptors.
2023-10-27 11:17:32 -06:00
Todd C. Miller
bf722e18b7 Updated translations from translationproject.org 2023-10-23 07:52:36 -06:00
Todd C. Miller
86f1d52a0b Add Andika Triwidada 2023-10-23 07:52:23 -06:00
Todd C. Miller
9a2a882d12 New Indonesian translation from translationproject.org 2023-10-23 07:51:29 -06:00
Todd C. Miller
0fbb17de5e Mention GitHub issue #318 2023-10-22 10:58:22 -06:00
Todd C. Miller
392ae0f030 Avoid a double-free in fuzz_policy caused by the early env_init(NULL).
This adds an env_free() function to explicitly free both the old
and new copies of the environment.  It is really only needed by
fuzz_policy, which calls the policy module multiple times.
2023-10-22 09:56:16 -06:00
Todd C. Miller
3bbc7c8f85 Store submitenv in eventlog and pass it to sudo_logsrvd. 2023-10-22 08:36:44 -06:00
Todd C. Miller
726b646b48 struct eventlog: rename argv/env to runargv/runenv.
This matches the JSON logs.
2023-10-21 19:15:46 -06:00
Todd C. Miller
c7a61a9438 struct sudoers_user_context: rename env_vars to env_add 2023-10-21 19:15:45 -06:00
Todd C. Miller
2b87749f8f Only log the run environment for commands that are allowed.
It may not be available otherwise and unless the command is being
run it has no real meaning.
2023-10-21 19:15:44 -06:00
Todd C. Miller
077826292c Free the private copy of the environment in sudoers_check_cmnd().
This reverts 5118eb5797fb, which had the side-effect of the PAM
session code running with the run environment instead of the invoking
user's environment.  Issue #318
2023-10-21 19:15:42 -06:00
Todd C. Miller
8486976b9e iolog_swapids: short circuit if effective ids match iolog ids. 2023-10-19 16:22:42 -06:00
Todd C. Miller
09a4264372 logsrvd: display error string in message if iolog_mkpath() fails 2023-10-19 14:39:13 -06:00
Todd C. Miller
29f7967420 Update .pot files for 1.9.15 2023-10-19 10:03:50 -06:00
Todd C. Miller
e3edd7a09a Add example for disabling intercept/log_subcmds for certain commands. 2023-10-18 17:35:40 -06:00
Todd C. Miller
78edde5ea1 Use NSIG instead of nitems(array) for the loop bound.
This matches the sudo_sys_siglist[] and sudo_sys_signame[] declarations.
2023-10-18 13:32:08 -06:00
Todd C. Miller
385d506d35 tsdump: fix compiler warnings 2023-10-18 10:02:16 -06:00
Todd C. Miller
14d514e5ac Avoid using %zu or %zd with printf() and fprintf().
This prevents problems on systems where the system printf(3) is not
C99-compliant.  We use our own snprintf() on such systems so that
is safe.
2023-10-17 20:14:53 -06:00
Todd C. Miller
58d6554a78 Use vsnprintf() instead of vfprintf() for sudo_printf() to avoid
problems on systems where the system printf(3) is not C99-compliant.
We use our own snprintf() on such systems.
2023-10-17 20:09:16 -06:00
Todd C. Miller
cf9fc5317e strlcpy_expand_host, sudo_getdelim, sudo_realpath: add restrict qualifier 2023-10-17 10:47:43 -06:00
Todd C. Miller
29ddd26793 Fixed GitHub issue #312. 2023-10-17 10:28:55 -06:00
Rose
97f8052427 Add restrict to strlcpy and expand_prompt 2023-10-17 10:33:15 -06:00
Todd C. Miller
fabb6264fc Better handling of multiple sudo processes modifying terminal settings.
1. Lock the terminal before tcgetattr/tcsetattr
2. Don't restore terminal settings if changed by another process
3. Don't set terminal to raw mode if it is already raw
GitHub issue #312
2023-10-16 19:27:27 -06:00
Todd C. Miller
2f80865e73 Add a little extra debugging info. 2023-10-16 12:07:35 -06:00
Rose
b2a44430b5 Redundant cast removal in sudoers_hooks
def_sudoers_locale is already a char*
2023-10-15 11:25:28 -06:00
Rose
e095069d2a Prefer fputs over fprintf where possible
fprintf does extra work and meant for formatting strings.
2023-10-15 10:28:57 -06:00
Rose
a4cbd7fe7b Swap calloc arguments to use them properly. 2023-10-15 10:19:58 -06:00
Rose
dd8426f9cf Specify 1U over 1 for bitmaps 2023-10-14 16:23:59 -06:00
Todd C. Miller
873e0de078 ptrace_intercept_execve: make flags unsigned to match command_details 2023-10-14 16:12:06 -06:00
Todd C. Miller
2d437c793d Fix spelling: resistent -> resistant 2023-10-12 10:20:34 -06:00
Todd C. Miller
98c2eeafd5 Add plugins/sudoers/tsgetusershell.c to ignore files. 2023-10-05 13:59:44 -06:00
Alexander F. Rødseth
07426f8a1a Add Orbiton ("o") to the list of editors that supports +lineno 2023-10-02 14:44:10 -06:00
Alexander F. Rødseth
356ea96ef7 Sort the list of editors that supports +lineno 2023-10-02 14:44:10 -06:00
Todd C. Miller
9a715b6941 Fix compatibility with older versions of (new) awk.
Do not rely on awk supporting "-f -" to read the program from stdin.
Avoid using POSIX character classes in regular expressions.
2023-10-02 10:31:55 -06:00
Todd C. Miller
3141f63b25 Mention potential problems with log_subcmds and intercept. 2023-09-28 17:01:02 -06:00
Todd C. Miller
f6561bc974 Add more user info to the list of objects to be garbage-collected at exit. 2023-09-28 13:37:42 -06:00
Todd C. Miller
344e0daecc Use long, not long long, when getting/setting numeric attributes.
We use int or long, not long long, in the Python plugin.
2023-09-27 16:35:39 -06:00
Todd C. Miller
1398289fab Add casts when storing values in a struct timespec.
Fixes -Wconversion warnings on some 32-bit systems where time_t is
still 32-bit.
2023-09-27 15:11:10 -06:00
Todd C. Miller
9cc57f4936 sudo_file_open: initialize parser before calling open_sudoers().
Otherwise, the parser_conf settings in the context passed to
sudo_file_open() will not be honored by open_sudoers().
Affected settings include ignore_perms, sudoers mode, uid and gid.
2023-09-27 15:16:18 -06:00
Rose
b2f8c5666d Use U, not UL, for 32-bit platforms
size_t is an unsigned int on 32-bit platforms, not an unsigned long.
2023-09-27 14:43:09 -06:00
Todd C. Miller
837f400ac8 digest_matches: actually use fd2 in place of fd as needed. 2023-09-26 11:51:10 -06:00
Todd C. Miller
ff2d8464cf digest_matches: if fd argument is -1, try to open path before failing 2023-09-26 11:44:37 -06:00
Todd C. Miller
4d4279d0ca Add missing execute bit on some test scripts. 2023-09-26 10:58:36 -06:00
Todd C. Miller
29feb41da2 max_groups in sudoers_plugin_settings is no longer used. 2023-09-25 11:32:15 -06:00
Todd C. Miller
e343e07543 Use #include <foo.h> instead of #include "foo.h" in most cases.
We rely on the include path to find many of these headers.  It
especially doesn't make sense to use #include "foo.h" for headers
in the top-level include directory.
2023-09-25 10:13:28 -06:00
Todd C. Miller
884b025962 Bump xcode to 14.2.0 2023-09-25 08:21:43 -06:00
Todd C. Miller
1c13b8a628 Add support for "plugin" defaults type. 2023-09-24 16:28:36 -06:00