Commit Graph

79 Commits

Author SHA1 Message Date
Todd C. Miller
0010c98613 Pass the name to the config.cache file to the build script.
If --cache-file is not specified, no config.cache file will be used.
Add an "omit_artifacts" setting for platforms where we don't publish
artifacts.
2023-01-20 10:30:19 -07:00
Todd C. Miller
adf2a432af Use the POSIX shell "command -v" instead of "which" to find programs.
Fix false detection of init.d/service status.
2022-12-27 12:28:53 -07:00
Todd C. Miller
f6e0e87ba9 sudo 1.9.13
Document the changes to AIX plugins in docs/UPGRADE.md and regenerate
configure using the latest autoconf from git.
2022-12-26 10:47:51 -07:00
Todd C. Miller
702f21f7f6 Remove anything after whitespace in MANIFEST when building tarball.
This is consistent with how sudo's Makefile builds the tarball.
2022-12-26 08:13:43 -07:00
Todd C. Miller
31684dccc0 Defer installing the SIGCHLD handler until after non-job commands run.
Lock the socket dir to avoid races in open_persistent_connection().
Also avoid using "ssh -f" since that may return before the socket is created.
Strip carriage returns from log when running in a pty.
2022-12-07 07:44:44 -07:00
Todd C. Miller
a44a005f0b Convert from using IPC::Open3 to IPC::Run.
Run tests in a pty so check_ttyname works as expected.
Explicitly set short command line options letters in GetOptions().
Add a debug flag to help see what is going on internally.
Add hook for die() to kill running jobs when we are dying.
SSH_AGENT_PID will not be present if the agent is forwarded.
In close_persistent_connections() only close active connections.
2022-11-30 11:19:44 -07:00
Todd C. Miller
63e58cbbec The distributed package build script I use to build all sudo packages.
This is not included in the release tarball because it is of limited
use to other people.
2022-11-28 12:46:32 -07:00
Todd C. Miller
7ac13204f2 Use clang, not /usr/bin/cc on FreeBSD and macOS.
While /usr/bin/cc _is_ clang on those platforms, some static analyzers
get confused if we don't run it as clang.
2022-11-22 07:21:01 -07:00
Todd C. Miller
981cc2f8e3 Better matching of macOS version to SDK path. 2022-11-17 14:26:55 -07:00
Todd C. Miller
920d384941 Regenerate with the autoconf 2.72a pre-release. 2022-11-16 10:26:08 -07:00
Todd C. Miller
371b974e07 Use "hg log --template" instead of "hg log --style". 2022-10-01 16:59:07 -06:00
Todd C. Miller
376d18b5da Add fchownat() systems without it. 2022-09-21 19:08:12 -06:00
Todd C. Miller
a14bef6a41 Do not check files generated by protbuf-c with PVS-Studio 2022-06-29 10:17:35 -06:00
Todd C. Miller
71c07579ba Update to protobuf-c 1.4.0 2022-06-03 12:50:31 -06:00
kernelmethod
0b541c2029 Add a --with-apparmor build flag
Add a new build flag, --with-apparmor, that builds sudo with AppArmor
support. Modify the build script for Debian and Ubuntu to enable this
flag by default.
2022-05-23 13:41:14 -06:00
Todd C. Miller
b61a55eb1b Fix dependency check for libssl on Debian/Ubuntu with OpenSSL 3.
Also add check for python 3.10 and 3.11 and remove versions < 3.4.
Fixes building on Ubuntu 22.04.
2022-05-15 07:45:51 -06:00
Todd C. Miller
4a7d26c381 Fix OS major version detection on CentOS Stream 2022-05-12 09:42:34 -06:00
Todd C. Miller
cc4d7196ff Update to libtool 2.4.7. 2022-03-31 16:14:10 -06:00
Todd C. Miller
dfd8ef2931 Fix a typo in the AIX section. 2022-03-29 16:53:37 -06:00
Todd C. Miller
9f47ea5cb0 Repair generate_test_coverage.sh after move to scripts directory. 2022-03-02 13:45:16 -07:00
Todd C. Miller
79d8500347 Allow ARCH_FLAGS to be overridden and handle macOS 12. 2022-02-23 20:04:21 -07:00
Todd C. Miller
9f427b0172 Prefer if [ ... ]; then over if test ...; then. 2022-02-23 20:03:33 -07:00
Todd C. Miller
ada7d43825 Fix potential infinite loop when trying to format long lines. 2022-01-25 12:10:36 -07:00
Todd C. Miller
c13b21c199 Avoid TOCTOU in sudo_mkdir_parents() using openat(2) and mkdirat(2).
This also allows us to make path const as it should be.
2021-12-11 08:35:18 -07:00
Todd C. Miller
7b0b186994 Update PolyPkg 2021-11-19 12:26:30 -07:00
Todd C. Miller
0a89b87a3f mkpkg: handle a macOS SDK that just uses the major version.
For example, MacOSX11.sdk instead of MacOSX11.3.sdk.
2021-11-18 15:40:36 -07:00
Todd C. Miller
733fe4bd1a Build python package on Fedora 2021-11-04 10:59:24 -06:00
Todd C. Miller
4eebd53bce parse_gentime: use timegm() to generate time since the epoch
The timegm() function is non-standard but widely available.
Provide an implementation for those systems that lack it.
Bug #1006
2021-10-31 09:27:34 -06:00
Todd C. Miller
b506497fe4 Fix pasto in gmtime_r and localtime_r macros.
Also add missing Makefile targets for them.
2021-10-31 09:01:18 -06:00
Todd C. Miller
12c8dba4ca Back out f2d82771e7dd, arm64e on macOS is still in preview state.
Until arm64e on macOS is finalized, continue to build arm64 packages.
2021-10-29 13:03:36 -06:00
Todd C. Miller
491aee866b Build arm64e ABI binaries on macOS 11 and above.
We originally used arm64 here but the correct ABI is arm64e.
The arm64 arch will be removed in a future release.
2021-10-27 09:51:09 -06:00
Todd C. Miller
badd6267bd Fix compilation of standalone arc4random_buf().
Apparently this code was never compiled anywhere.
2021-10-20 08:52:04 -06:00
Todd C. Miller
7a56c9871e mkpkg: preserve make exit value on exit
Fixes a problem where the exit value from mkpkg was 0 even on error.
2021-10-10 16:14:52 -06:00
Todd C. Miller
4289e9609d Teach mkdep.pl about --tag=disable-static in LTFLAGS.
If static objs are disabled we need to add explicit dependencies for
.o files.  The OpenBSD libtool doesn't use a pic object file when
linking executables so we need to build the non-pic objects too.
2021-09-13 09:33:17 -06:00
Todd C. Miller
18613eee22 mkpkg: limit the number of cores used to 16 2021-09-17 09:10:27 -06:00
Todd C. Miller
38d884a62d Do not compile intercept code if --disable-intercept is specified. 2021-09-01 13:35:47 -06:00
Todd C. Miller
3f30704ab7 Add trivial support for FreeBSD packages.
The actual FreeBSD port supports multiple options but this is sufficient
for testing purposes.
2021-08-11 15:09:00 -06:00
Todd C. Miller
374d499818 FreeBSD: Set default directory and file mode if not specified in %files
Otherwise, a mode of 0 will be used, potentially rendering the
system unusable.
2021-08-11 14:59:27 -06:00
Todd C. Miller
57cb62d7dc On macOS, don't disable tty tickets and set password timeout to 0.
This more closely matches the options used by the macOS version of sudo.
2021-08-02 11:11:05 -06:00
Todd C. Miller
cc3b4ffb04 Remove vsyslog(3) emulation, it is no longer used. 2021-06-14 13:11:39 -06:00
Todd C. Miller
2e492267e7 Build sudo_noexec.so as a module on systems other then Darwin.
On Darwin, shared modules and shared libraries are not interchangable
and since we preload sudo_noexec.so via DYLD_INSERT_LIBRARIES it
must be a library, not a module.  We must relax the requirement
that libraries begin with a "lib" prefix to work around this
difference.  This does mean you must use sudo's libtool on Darwin
(macOS) but that is already a requirement on other systems (notably
HP-UX and SCO) due to a number of libtool patches we require that
haven't be accepted upstream.  This is a different fix for PR #102.
2021-05-13 12:45:56 -06:00
Todd C. Miller
0645a2ade6 Use /usr/bin/cc on FreeBSD and macOS. 2021-05-12 15:19:43 -06:00
Todd C. Miller
3018c1cd2d Build python plugin for RHEL 6 as well. 2021-05-06 18:59:51 -06:00
Todd C. Miller
b5542f8b26 Fix detection of the volatile flag when other flags are present.
Otherwise flags fields like "volatile,ignore-other" will be ignored
by the Debian and BSD back ends.
2021-05-03 13:51:21 -06:00
Todd C. Miller
d4517e0a1c Move autoconf auxiliary files to the scripts directory. 2021-04-06 14:23:38 -06:00
Todd C. Miller
42fbc185ab Solaris 11.4 removed /usr/bin/optisa, use /usr/bin/isainfo instead. 2021-03-10 07:29:52 -07:00
Todd C. Miller
2b564cd7b2 Only put specific directories in the ROOT section of the AIX package.
Previously, /usr and /opt were placed in USR and everything else
went in ROOT.  Now, only /dev, /etc, /sbin and /var go in ROOT.
2021-03-06 16:23:24 -07:00
Todd C. Miller
db4ee0a903 Append to CFLAGS and LDFLAGS instead of overriding them when adding -m64. 2021-02-07 15:38:11 -07:00
Todd C. Miller
06bfbecd64 Add emulation of pread(3) and pwrite(3) for systems without them.
This makes it possible to remove some ugly #ifdefs and only affects
very old systems.
2021-01-02 10:43:34 -07:00
Todd C. Miller
d28b4291c4 Build universal binaries on macOS 11.0 and higher.
The resulting package should work on Macs based on Apple Silicon.
2020-11-13 09:46:00 -07:00