Commit Graph

10616 Commits

Author SHA1 Message Date
Todd C. Miller
4f1fff953b Guard use of ttyslot() with HAVE_TTYSLOT, fix guard for utmp_setid().
This should make it easier to compile sudo on Android which doesn't
provide a way to write to the utmp file.  Bug #940.
2020-09-17 20:05:30 -06:00
Todd C. Miller
a001303285 Updated translations from translationproject.org 2020-09-16 19:13:17 -06:00
Todd C. Miller
9f6a3d35cb Updated translations from translationproject.org 2020-09-16 13:28:03 -06:00
Todd C. Miller
1154e1d605 Back out sudo 1.9.3b1 version change. 2020-09-16 06:19:42 -06:00
Todd C. Miller
def99ffd78 Fix typo in warning for T_CHPATH, list '~' not '*' twice.
Bug #938
2020-09-14 06:54:15 -06:00
Todd C. Miller
86df234e14 Update .pot files for 1.9.3. 2020-09-12 08:29:18 -06:00
Todd C. Miller
3fc3b62d72 Add missing check for strdup() failure.
Coverity CID 214243
2020-09-10 08:10:05 -06:00
Todd C. Miller
4239a45b69 Sync example sudoers with manual page. 2020-09-10 07:53:22 -06:00
Todd C. Miller
5ca6056a32 Add simple runchroot and runcwd examples.
Also document the limitation of command-based Defaults settings.
2020-09-09 21:16:38 -06:00
Todd C. Miller
c200e71637 Add callback for runchroot Defaults and require password -D/-R checks.
Using a command-based Default for runchroot will still only work for
paths that exist both in and outside the chroot.
2020-09-09 19:18:24 -06:00
Todd C. Miller
10d3d69aa1 Pass a struct to the match functions to track the resolved command.
This makes it possible to update user_cmnd and cmnd_status modified
by per-rule CHROOT settings.
2020-09-09 15:26:45 -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
e9997c8ec4 Remove closefrom_fallback() from lib/util/util.exp.
It is a static function and should not be exported.
2020-09-06 15:27:21 -06:00
Evan Anderson
92e5d81943 configure: Fix runstatedir handling for distros that do not support it
runstatedir was added in yet-to-be released autoconf 2.70. Some distros
are shipping this addition in their autoconf packages, but others, such as Fedora,
are not. This causes the rundir variable to be set incorrectly if the configure script
is regenerated with an unpatched autoconf since the runstatedir variable set is deleted
after regeneration. This change works around that problem by checking that runstatedir
is non-empty before potentially using it to set the rundir variable
2020-09-06 15:32:50 -06:00
Todd C. Miller
3d9154cd4f We need to link with NET_LIBS for gai_strerror() on some systems.
From Tim Rice
2020-09-05 21:10:28 -06:00
Todd C. Miller
d6ed38e7e3 Fix sco library versioning; fallout from frebsd-elf reorg.
From Tim Rice
2020-09-05 20:14:09 -06:00
Todd C. Miller
72b28bbc3e SVR4/5 fixes and long password support for OpenServer 6 & 5.
From Tim Rice
2020-09-05 19:29:06 -06:00
Todd C. Miller
0f8802676e Use config.h to handle systems without inline function support. 2020-09-05 19:18:49 -06:00
Todd C. Miller
f6cb5c72bc Prefer dlopen() over shl_load() on HP-UX 11.11 and higher. 2020-09-05 15:38:33 -06:00
Todd C. Miller
d56347b981 Define sudo_warn_setlocale_t and use sudo_conv_t in sudo_fatal.h.
Works around a bug in older versions of the HP ANSI C compiler
and results in more readable code.
2020-09-05 08:21:43 -06:00
Todd C. Miller
a7033f33a9 HP-UX cc may not allow __declspec(dllexport) to be used in conjunction
with "#pragma HP_DEFINED_EXTERNAL" when redefining standard libc functions.
2020-09-05 07:10:24 -06:00
Todd C. Miller
88c7a35dd5 Fix check for hiding unexported symbols on HP-UX.
We need to pass the -b option to the compiler, not just the linker,
so it will choose the PIC C runtime.
2020-09-04 21:43:30 -06:00
Todd C. Miller
cc8e6c6015 Check that the files are character devices before comparing st_rdev. 2020-09-04 19:13:50 -06:00
Todd C. Miller
a0092ce31f Fix regress when ttyname(3) returns the same device under a different name.
On systems that have both new and old pty names we can end up with
a name mismatch even though the underlying device is the same.
2020-09-04 19:02:26 -06:00
Todd C. Miller
e561f5b857 Use the same pattern of redefining TESTDIR as test10.sh.
Adapted from a diff from Tim Rice.
2020-09-04 17:24:09 -06:00
Todd C. Miller
e92d10011e Rename sa_len -> sa_size to avoid a conflict on UnixWare and others.
On some systems, sa_len is a #define for 4.4BSD compatibility.
2020-09-04 16:06:37 -06:00
Todd C. Miller
f6a14c9414 Include strings.h for strcasecmp(3).
From Tim Rice
2020-09-04 15:59:27 -06:00
Todd C. Miller
c4b9f6136d Add missing #ifdef HAVE_CLOCK_GETTIME in getentropy_fallback()
From Tim Rice
2020-09-04 15:55:11 -06:00
Todd C. Miller
f6d477692f Regen for check_exptilde.o 2020-09-04 15:53:41 -06:00
Todd C. Miller
dad149f785 Add missing dependency info for cfmakeraw.lo in lib/util/Makefile.in
From Tim Rice
2020-09-04 15:51:45 -06:00
Todd C. Miller
fb64210f75 Be consistent and use __hpux not __hpux__ like the rest of sudo. 2020-09-04 15:28:56 -06:00
Todd C. Miller
0576eb0105 Replace "static inline" with "static __inline" for older compilers. 2020-09-04 13:52:46 -06:00
Todd C. Miller
eaa95acb31 Post-process protoc-c files to avoid depending on anonymous unions.
Based on a patch from Michael Osipov.
GitHub issue #60
2020-09-04 13:17:51 -06:00
Todd C. Miller
24b35393e3 Add sudoers_audit to sudo_sudoers_plugin_symbols[] array.
Fixes loading of sudoers_audit when configured with --enable-static-sudoers.
GitHub issue #61
2020-09-04 10:59:41 -06:00
Todd C. Miller
8a8a24560e Fix copy and paste error; Coverity CID 214191 2020-09-03 13:23:27 -06:00
Todd C. Miller
24d5ee5893 Fix memory leak on error found by the clang 10.01 analyzer. 2020-09-03 13:07:38 -06:00
Todd C. Miller
0106343032 Use correct size for curlim and maxlim. 2020-09-03 10:20:28 -06:00
Todd C. Miller
049430ee5b Only install man pages for logsrvd and python plugin if we build them.
GitHub issue #58
2020-09-03 06:44:43 -06:00
Todd C. Miller
21a2dce506 Remove obsolete mansrcdir variable, add _SRC suffix to LOGSRV and LOGSRVD 2020-09-03 06:03:28 -06:00
Todd C. Miller
fd06e588ee If the command was run in a chroot, add it to the log. 2020-09-02 16:57:55 -06:00
Todd C. Miller
226307591c Log the runcwd not submitcwd in the sudo-style log file.
The log entry should reflect the working directory the command
actually ran in.
2020-09-02 11:23:26 -06:00
Todd C. Miller
a51d194a73 Add test of multiple syntax errors.
Where possible, the portion of the line before the error should be
still be interpreted.
2020-09-02 12:40:39 -06:00
Todd C. Miller
578789c56f Fix error recovery in a privilege after a ':' separator. 2020-09-02 11:01:09 -06:00
Todd C. Miller
fc563286ff Initialize runchroot and runcwd in init_options() 2020-09-02 09:34:43 -06:00
Todd C. Miller
2adde428c5 Fix path to check_exptilde.c 2020-09-02 09:20:19 -06:00
Todd C. Miller
965ad74482 Update to protobuf-c 1.3.3 2020-09-02 09:06:29 -06:00
Todd C. Miller
e3b85171f8 Regenerate the parser with "bison -y" for verbose syntax error messages. 2020-09-01 21:34:30 -06:00
Todd C. Miller
b7130775f1 Add chroot/chdir changes. 2020-09-01 15:06:14 -06:00
Todd C. Miller
1676f0ceeb Support "*" for CWD/CHROOT to allow user to specify cwd or chroot.
Adds two new command line options, -D (--chdir) and -R (--chroot)
that can only be used when sudoers sets runcwd or runchroot to "*".
2020-09-01 14:10:02 -06:00
Todd C. Miller
bd254e1042 Read/write runchroot and runcwd entries in the JSON event log. 2020-09-01 06:26:05 -06:00