2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

600 Commits

Author SHA1 Message Date
Todd C. Miller
aa2498e46f Fix check for which man page type to use with nroff
Fixes a bug where configure would use *.man instead of *.mdoc on
systems without mandoc.  Bug #1077.
2025-07-24 10:37:01 -06:00
Todd C. Miller
f0e1a5ca38 Sudo 1.9.17p2 2025-07-24 07:34:35 -06:00
Todd C. Miller
2dc10cfbd3 Fix check for which man page type to use with nroff
Fixes a bug where configure would use *.man instead of *.mdoc on
systems without mandoc.
2025-07-21 09:04:59 -06:00
Todd C. Miller
23aff2b372 Sudo 1.9.17p1 2025-06-28 11:05:20 -06:00
Todd C. Miller
cb3355e9d4 Sudo 1.9.17 2025-06-08 16:47:28 -06:00
Todd C. Miller
fce45b2767 Make ignore_dot the default
Add --disable-ignore-dot to disable it and deprecate --with-ignore-dot.
2025-03-08 17:59:32 -07:00
Todd C. Miller
c2e77b7133 Add check_man script to check for man page warnings. 2025-02-27 08:21:22 -07:00
Todd C. Miller
a4a999b5eb Run groff with warnings enabled for "make lint". 2025-02-10 19:40:26 -07:00
Todd C. Miller
7c075c100d Add an OFF_T_MAX define
This will be used for integer overflow checks when copying files.
2025-01-15 08:39:36 -07:00
Todd C. Miller
103af8cb27 Newer macOS deprecates -force_flat_namespace for -flat_namespace
The linker warns about -force-flat_namespace and uses -flat_namespace
instead.  Check for -flat_namespace if -force-flat_namespace is not
found.
2025-01-04 10:31:50 -07:00
Todd C. Miller
73cbe4e7e1 Sudo 1.9.16p2 2024-11-25 08:34:04 -07:00
Todd C. Miller
abc0baffc4 Sudo 1.9.16p1 2024-11-12 08:56:50 -07:00
Andy Fiddaman
131e7e2de0 Allow --secure-path-value=no
This adds support for --with-secure-path-value=no to allow packagers
to ship the sudoers configuration file with the secure path
line commented out if required.
2024-09-21 14:03:24 -06:00
Todd C. Miller
3e12cacc0f Better test for cross-compiling when checking for C99 snprintf
We want to avoid calling AX_FUNC_SNPRINTF entirely if cross-compiling
since it is not possible to undo the setting of PREFER_PORTABLE_SNPRINTF.
The previous attempt to do this failed to take into account that
PREFER_PORTABLE_SNPRINTF would still be defined.  GitHub issue #969
2024-09-02 17:10:19 -06:00
Todd C. Miller
cc8c43c4d6 Format ttydev as (signed) long long, not unsigned.
Now that we parse ttydev as a long long it makes more sense to
format it the same way.  This completely avoids the sign extension
issue on systems where dev_t is signed.
2024-08-14 07:53:00 -06:00
Todd C. Miller
46274e725e Fix formatting of ttydev on systems with signed 32-bit dev_t
If dev_t is 32-bit and signed, formatting as an unsigned long long
may result in a bogus value due to sign extension.
2024-08-13 20:07:28 -06:00
Todd C. Miller
e24737eac9 Add --with-secure-path-value option
This can be used by package maintainers to set the value of secure_path
that is substituted into the default sudoers file.
2024-07-28 15:44:07 -06:00
Todd C. Miller
986fdec537 Rename secure_path_set -> secure_path_status 2024-07-28 15:11:42 -06:00
Todd C. Miller
920710b186 If cross-compiling with a C99 compiler, assume snprintf is compliant.
This is a better default than assuming it is not compliant (the
previous behavior) when cross-compiling.  These days it is rare for
sudo to be built on pre-C99 systems.  GitHub issue #969
2024-07-02 19:55:29 -06:00
Todd C. Miller
e0e24456bc Enable secure_path in default sudoers file.
It is still disabled by default in the sudo binary.
2024-06-10 20:37:05 -06:00
Todd C. Miller
1db1453556 Preserve SUDO_EDITOR, EDITOR, and VISUAL for visudo. 2024-06-10 08:17:17 -06:00
Todd C. Miller
eec523aab2 Sudo 1.9.16 2024-06-08 09:05:53 -06:00
Todd C. Miller
50ae48a4ba Compile in support for insults by default.
Insults are still disabled by default but can be enabled in the
sudoers file.  To completely disable insult support, use the
--without-insults configure option.
2024-06-08 08:24:54 -06:00
Todd C. Miller
4d47acf69b Check JSON output with jq if present. 2024-04-30 09:34:10 -06:00
Todd C. Miller
f0823c70c6 Remove offensive insults that were disabled by default anyway.
Bug #1058
2024-03-18 09:14:15 -06:00
Todd C. Miller
bafdcc3d40 Check if ac_cv_sys_file_offset_bits is "64", not "yes"
This is used for determining whether to set _TIME_BITS with autoconf
versions before 2.72.
2024-02-18 07:09:10 -07:00
Todd C. Miller
00b2bd3589 Sudo 1.9.15p5 2023-12-29 14:43:39 -07:00
Todd C. Miller
ad4dc22d5a Automatically migrate lecture file path from name-based to uid-based.
GitHub issue #342.
2023-12-22 09:39:24 -07:00
Todd C. Miller
680352b917 Sudo 1.9.15p4 2023-12-15 10:57:24 -07:00
Todd C. Miller
c9198ef4df Sudo 1.9.15p3 2023-12-13 12:15:12 -07:00
Todd C. Miller
62895ea442 Sudo 1.9.15p2 2023-11-08 20:10:02 -07:00
Todd C. Miller
45aeeddcbe Sudo 1.9.15p1 2023-11-07 13:46:01 -07:00
Todd C. Miller
0c67456923 Sudo assumes that a uid_t can be cast to unsigned int without problems.
Add a configure check and error out if sizeof(uid_t) > 4.
2023-09-20 11:25:48 -06:00
Todd C. Miller
37ee2946aa sudo 1.9.15 2023-08-24 09:28:45 -06:00
Todd C. Miller
94b80e3ad4 Replace MAX_UID_T_LEN with calls to STRLEN_MAX_UNSIGNED. 2023-09-19 15:16:30 -06:00
Todd C. Miller
49c7c1f4d3 Only cast TIOCSWINSZ to int on systems that might require it (AIX).
Otherwise we end up with a -Wconversion warning on systems where
the ioctl() request argument is unsigned long.
2023-09-15 10:26:29 -06:00
Todd C. Miller
d6d467b92e Add implementation of SSL_read_ex/SSL_write_ex for those without. 2023-08-05 10:38:02 -06:00
Todd C. Miller
0a181849a1 Add --enable-postinstall, an optional phase when building packages.
This makes it possible to run an arbitrary script between "make
install" and the polypkg run.  This will be used to copy different
word size versions of sudo_intercept.so and sudo_noexec.so.
2023-07-31 19:46:00 -06:00
Todd C. Miller
980e0216ac Add basic support for 32-bit and 64-bit LD_PRELOAD equivalents.
The noexec and intercept DSO settings may now include both a 32-bit
DSO and a 64-bit DSO specified by a colon.  For example:
/usr/libexec/sudo/sudo_intercept.so:/usr/libexec/sudo/sudo_intercept_64.so.
2023-07-31 13:46:57 -06:00
Todd C. Miller
a432aed4f0 realpath.c: include limits.h and use sysconf(_SC_SYMLOOP_MAX)
This is more portable and eliminates the need to check for SYMLOOP_MAX
(and provide it if missing) in configure.  Also quiet some -Wconversion
warnings.
2023-07-10 15:52:16 -06:00
Todd C. Miller
f7801f2160 Add configure check for restrict keyword. 2023-07-07 15:06:53 -06:00
Todd C. Miller
bfb6132d9c Add configure tests for __builtin_clz/__builtin_clzl 2023-07-04 12:39:31 -06:00
Todd C. Miller
a0b074cc9c Fix undefined symbol on macOS for intercept mode and log_subcmds.
macOS does not support direct access to the environ pointer from a
shared object.  We need to redirect through _NSGetEnviron() instead.
Fixes GitHub issue #276.
2023-06-28 10:59:26 -06:00
Todd C. Miller
c7070b0475 sudo 1.9.14 2023-06-05 13:13:37 -06:00
Todd C. Miller
d4c6ef1222 Add adminconfdir and --enable-adminconf to set it.
Configuration paths in sudo are now a colon-separated list of files
with the adminconfdir instance first (if enabled), followed by a
sysconfdir instance.
2023-05-02 10:37:39 -06:00
Todd C. Miller
9ad6dfa371 Substitute for _PATH_SUDO* variables in pathnames.h.
Previously these were hard-coded with Makefile overrides.
2023-02-08 16:47:18 -07:00
Todd C. Miller
4363d03ef7 Convert config file paths to colon-separated path list.
This means that _PATH_SUDO_CONF, _PATH_SUDOERS, _PATH_SUDO_LOGSRVD_CONF,
and _PATH_CVTSUDOERS_CONF can now specify multiple files.  The first
file that exists is used.
2023-05-02 10:37:38 -06:00
Todd C. Miller
65c0b5a089 Move CONFIGURE_ARGS from sudo_usage.h.in to config.h.in. 2023-04-18 07:29:37 -06:00
Todd C. Miller
ae12d18ff0 Use -no-undefined on macOS to avoid "-undefined dynamic_lookup" warnings.
Starting with macOS 13, the linker warns when "-undefined dynamic_lookup"
is used.  This is added by libtool by default on macOS but we can
suppress it by passing -no-undefined to libtool.
2023-04-14 13:02:28 -06:00
Todd C. Miller
f0f5e1b5bc Use built-in tests for bit types instead of using AC_CHECK_TYPES.
This should be more portable as it handles the quirks of some older
systems.
2023-03-22 15:37:12 -06:00