23 Commits

Author SHA1 Message Date
THE-Spellchecker
5eba4b48cf Typographical and Grammatical fixes 2023-11-28 15:00:04 -07: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
df730dec5d Suppress some other PVS-Studio false positives. 2023-08-21 13:21:49 -06:00
Todd C. Miller
97fb4eae72 sudo_dso_load: add AIX fallback path from shlib.so to shlib.a(shlib.so).
If the .so file is missing but the .a file exists, try to dlopen()
the AIX .a file using the .so name as the member.  We need to avoid
breaking existing configurations if the type of AIX shared library
changes when sudo is upgraded.
2022-12-26 07:43:55 -07:00
Todd C. Miller
49f2d67070 Fix support for AIX-style path(module) syntax in sudo.conf Plugin lines. 2022-12-22 16:45:13 -07:00
Todd C. Miller
ecb5526fc8 Add missing include of sys/stat.h 2022-11-09 14:48:38 -07:00
Todd C. Miller
3ca21f9506 Fix a typo, muti-arch -> multi-arch
GitHub issue #185
2022-10-20 06:57:37 -06:00
Todd C. Miller
7e20e4b80f Apply multiarch rules when loading plugins too. 2022-10-06 12:46:38 -06:00
Todd C. Miller
0b506a2d07 sudo_dso_load: try multi-arch on Linux if we can't load the path.
For example, if loading /usr/lib/libsss_sudo.so fails, try again
with /usr/lib/x86_64-linux-gnu/libsss_sudo.so.
2022-10-05 15:26:14 -06:00
Todd C. Miller
9ebaabfdde sudo_dso_load: restore original error for AIX on failure.
For AIX, if dlopen() fails we try again with RTLD_MEMBER set
and a default member (shr.o or shr_64.o).  However, if that
also fails, the user will receive a useless error message
that doesn't correspond to the actual problem.  We now retry
the original dlopen() if the fallback to RTLD_MEMBER fails,
which has the effect of restoring the original error message.
2022-08-04 09:35:06 -06:00
Todd C. Miller
387169ac67 Add support on AIX for loading plugins that are .a (not .so) files.
It is possible to specify the member name in parens after the path,
e.g. sudoers.a(shr.o) for 32-bit or sudoers.a(shr_64.o) for 64-bit.
If no member is specified in the path and dlopen() fails with ENOEXEC,
try again with an explicit member, either shr.o or shr_64.o.
2021-02-19 11:03:26 -07: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
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
48fba3c2cc update my email to Todd.Miller@sudo.ws 2017-12-03 17:53:40 -07:00
Todd C. Miller
4a07b472f0 Only include stddef.h where it is needed. 2015-06-20 05:34:35 -06:00
Todd C. Miller
dc883f2454 We require ANSI C so stop using the obsolete STDC_HEADERS. 2015-06-19 14:29:27 -06:00
Todd C. Miller
47835ff289 Rename missing.h -> sudo_compat.h 2014-07-22 14:25:16 -06:00
Todd C. Miller
844a285391 Version the functions in libsudo_util 2014-07-22 11:26:17 -06:00
Todd C. Miller
088edcb6f5 Add exported libsudo_util functions to util.exp and mark in headers
using __dso_public.
2014-06-26 15:51:15 -06:00
Todd C. Miller
4d37a4a162 Top level directory reorg
Move src/po -> po
Combine common and compat -> lib/util
Move zlib -> lib/zlib
2014-06-26 15:51:02 -06:00