Skip to content

Commit 26f1789

Browse files
committed
Merge sudo 1.9.14 from tip.
--HG-- branch : 1.9
2 parents 16504a6 + a2a8732 commit 26f1789

257 files changed

Lines changed: 23894 additions & 17509 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
build_macos:
5757
description: Configure, build and package sudo (macOS)
5858
macos:
59-
xcode: 13.2.1 # indicate our selected version of Xcode
59+
xcode: 13.4.1 # indicate our selected version of Xcode
6060
steps:
6161
- checkout
6262
- run:

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: sudo-project
2+
open_collective: sudo-project

INSTALL.md

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ about the `configure` script itself.
1010

1111
## System requirements
1212

13-
To build sudo from the source distribution you need a POSIX-compliant
14-
operating system (any modern version of BSD, Linux, or Unix should work),
15-
an ANSI/ISO C compiler that supports the "long long" type, variadic
16-
macros (a C99 feature) as well as the ar, make, and ranlib utilities.
13+
To build sudo from the source distribution you will need a
14+
POSIX-compliant operating system (any modern version of BSD, Linux,
15+
or Unix should work), a C compiler that conforms to ISO C99 or
16+
higher, and the ar, make, and ranlib utilities.
1717

1818
If you wish to modify the parser then you will need flex version
19-
2.5.2 or later and either bison or byacc (sudo comes with a
20-
pre-generated parser). You'll also have to run configure with the
21-
--with-devel option or pass DEVEL=1 to make. You can get flex from
22-
https://github.com/westes/flex/. You can get GNU bison from
19+
2.5.2 or later and either bison or byacc (sudo comes with a parser
20+
generated with GNU bison). You'll also have to run configure with
21+
the --with-devel option or pass DEVEL=1 to make. You can get flex
22+
from https://github.com/westes/flex/. You can get GNU bison from
2323
https://ftp.gnu.org/pub/gnu/bison/ or any GNU mirror.
2424

2525
Some systems will also require that development library packages be
@@ -110,7 +110,8 @@ Defaults are listed in brackets after the description.
110110
Install plugins and helper programs in DIR/sudo [PREFIX/libexec/sudo]
111111

112112
--sysconfdir=DIR
113-
Look for `sudo.conf` and `sudoers` files in DIR. [/etc]
113+
Look for configuration files such as `sudo.conf` and `sudoers`
114+
in DIR. [/etc]
114115

115116
--includedir=DIR
116117
Install sudo_plugin.h include file in DIR [PREFIX/include]
@@ -226,9 +227,11 @@ Defaults are listed in brackets after the description.
226227
-fstack-clash-protection, -fcf-protection and linking with
227228
-zrelro, -znow, and -znoexecstack where supported.
228229

229-
--disable-ssp
230-
Disable use of the -fstack-protector compiler option.
231-
This does not affect the other hardening options.
230+
--disable-largefile
231+
Disable support for large (64-bit) files on 32-bit systems
232+
where the maximum file size is normally 4GB. By default,
233+
configure will enable support for 64-bit file sizes if
234+
supported by the operating system.
232235

233236
--disable-leaks
234237
Avoid leaking memory even when we are headed for exit,
@@ -278,6 +281,10 @@ Defaults are listed in brackets after the description.
278281
instead. This option may only be used in conjunction with
279282
the --enable-static-sudoers option.
280283

284+
--disable-ssp
285+
Disable use of the -fstack-protector compiler option.
286+
This does not affect the other hardening options.
287+
281288
--enable-static-sudoers
282289
By default, the sudoers plugin is built and installed as a
283290
dynamic shared object. When the --enable-static-sudoers
@@ -294,6 +301,11 @@ Defaults are listed in brackets after the description.
294301
use the /usr/lib/tmpfiles.d directory if the file
295302
/usr/lib/tmpfiles.d/systemd.conf exists.
296303

304+
--disable-year2038
305+
Disable support for dates after January 2038. By default,
306+
configure will enable support for 64-bit time_t values if
307+
supported by the operating system.
308+
297309
--enable-zlib[=location]
298310
Enable the use of the zlib compress library when storing
299311
I/O log files. If specified, location is the base directory
@@ -347,6 +359,15 @@ Defaults are listed in brackets after the description.
347359

348360
### Optional features:
349361

362+
--enable-adminconf=[DIR]
363+
Search for configuration files in adminconfdir (PREFIX/etc
364+
by default) in preference to configuration files in sysconfdir
365+
(/etc by default). This can be used on systems where
366+
sysconfdir is located on a read-only filesystem. When this
367+
option is enabled, the visudo utility will store edited
368+
sudoers files in adminconfdir if the original was located
369+
in sysconfdir.
370+
350371
--disable-root-mailer
351372
By default sudo will run the mailer as root when tattling
352373
on a user so as to prevent that user from killing the mailer.

MANIFEST

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,31 @@ lib/eventlog/eventlog.c
116116
lib/eventlog/eventlog_conf.c
117117
lib/eventlog/eventlog_free.c
118118
lib/eventlog/logwrap.c
119+
lib/eventlog/parse_json.c
120+
lib/eventlog/parse_json.h
121+
lib/eventlog/regress/eventlog_store/store_json_test.c
122+
lib/eventlog/regress/eventlog_store/store_sudo_test.c
123+
lib/eventlog/regress/eventlog_store/test1.json.in
124+
lib/eventlog/regress/eventlog_store/test1.json.out.ok
125+
lib/eventlog/regress/eventlog_store/test1.sudo.out.ok
126+
lib/eventlog/regress/eventlog_store/test2.json.in
127+
lib/eventlog/regress/eventlog_store/test2.json.out.ok
128+
lib/eventlog/regress/eventlog_store/test2.sudo.out.ok
129+
lib/eventlog/regress/eventlog_store/test3.json.in
130+
lib/eventlog/regress/eventlog_store/test3.json.out.ok
131+
lib/eventlog/regress/eventlog_store/test3.sudo.out.ok
132+
lib/eventlog/regress/eventlog_store/test4.json.in
133+
lib/eventlog/regress/eventlog_store/test4.json.out.ok
134+
lib/eventlog/regress/eventlog_store/test4.sudo.out.ok
119135
lib/eventlog/regress/logwrap/check_wrap.c
120136
lib/eventlog/regress/logwrap/check_wrap.in
121137
lib/eventlog/regress/logwrap/check_wrap.out.ok
138+
lib/eventlog/regress/parse_json/check_parse_json.c
139+
lib/eventlog/regress/parse_json/test1.in
140+
lib/eventlog/regress/parse_json/test2.in
141+
lib/eventlog/regress/parse_json/test2.out.ok
142+
lib/eventlog/regress/parse_json/test3.in
143+
lib/eventlog/regress/parse_json/test3.out.ok
122144
lib/fuzzstub/Makefile.in
123145
lib/fuzzstub/fuzzstub.c
124146
lib/iolog/Makefile.in
@@ -132,7 +154,6 @@ lib/iolog/iolog_filter.c
132154
lib/iolog/iolog_flush.c
133155
lib/iolog/iolog_gets.c
134156
lib/iolog/iolog_json.c
135-
lib/iolog/iolog_json.h
136157
lib/iolog/iolog_legacy.c
137158
lib/iolog/iolog_loginfo.c
138159
lib/iolog/iolog_mkdirs.c
@@ -197,12 +218,6 @@ lib/iolog/regress/iolog_filter/test3/timing
197218
lib/iolog/regress/iolog_filter/test3/ttyin
198219
lib/iolog/regress/iolog_filter/test3/ttyin.filtered
199220
lib/iolog/regress/iolog_filter/test3/ttyout
200-
lib/iolog/regress/iolog_json/check_iolog_json.c
201-
lib/iolog/regress/iolog_json/test1.in
202-
lib/iolog/regress/iolog_json/test2.in
203-
lib/iolog/regress/iolog_json/test2.out.ok
204-
lib/iolog/regress/iolog_json/test3.in
205-
lib/iolog/regress/iolog_json/test3.out.ok
206221
lib/iolog/regress/iolog_mkpath/check_iolog_mkpath.c
207222
lib/iolog/regress/iolog_path/check_iolog_path.c
208223
lib/iolog/regress/iolog_path/data
@@ -236,7 +251,6 @@ lib/util/fnmatch.c
236251
lib/util/freezero.c
237252
lib/util/fstatat.c
238253
lib/util/getaddrinfo.c
239-
lib/util/getcwd.c
240254
lib/util/getdelim.c
241255
lib/util/getentropy.c
242256
lib/util/getgrouplist.c
@@ -276,11 +290,13 @@ lib/util/pw_dup.c
276290
lib/util/pwrite.c
277291
lib/util/rcstr.c
278292
lib/util/reallocarray.c
293+
lib/util/realpath.c
279294
lib/util/regex.c
280295
lib/util/regress/closefrom/closefrom_test.c
281296
lib/util/regress/corpus/seed/sudo_conf/sudo.conf.1
282297
lib/util/regress/corpus/seed/sudo_conf/sudo.conf.2
283298
lib/util/regress/corpus/seed/sudo_conf/sudo.conf.3
299+
lib/util/regress/digest/digest_test.c
284300
lib/util/regress/fnmatch/fnm_test.c
285301
lib/util/regress/fnmatch/fnm_test.in
286302
lib/util/regress/fuzz/fuzz_sudo_conf.c
@@ -598,6 +614,7 @@ plugins/sudoers/b64_encode.c
598614
plugins/sudoers/boottime.c
599615
plugins/sudoers/bsm_audit.c
600616
plugins/sudoers/bsm_audit.h
617+
plugins/sudoers/canon_path.c
601618
plugins/sudoers/check.c
602619
plugins/sudoers/check.h
603620
plugins/sudoers/check_aliases.c
@@ -645,6 +662,7 @@ plugins/sudoers/iolog.c
645662
plugins/sudoers/iolog_path_escapes.c
646663
plugins/sudoers/ldap.c
647664
plugins/sudoers/ldap_conf.c
665+
plugins/sudoers/ldap_innetgr.c
648666
plugins/sudoers/ldap_util.c
649667
plugins/sudoers/linux_audit.c
650668
plugins/sudoers/linux_audit.h
@@ -661,6 +679,7 @@ plugins/sudoers/mkdefaults
661679
plugins/sudoers/parse.c
662680
plugins/sudoers/parse.h
663681
plugins/sudoers/parse_ldif.c
682+
plugins/sudoers/pivot.c
664683
plugins/sudoers/po/README
665684
plugins/sudoers/po/ast.mo
666685
plugins/sudoers/po/ast.po
@@ -1034,6 +1053,7 @@ plugins/sudoers/regress/sudoers/test9.ldif.ok
10341053
plugins/sudoers/regress/sudoers/test9.out.ok
10351054
plugins/sudoers/regress/sudoers/test9.toke.ok
10361055
plugins/sudoers/regress/testsudoers/group
1056+
plugins/sudoers/regress/testsudoers/passwd
10371057
plugins/sudoers/regress/testsudoers/test1.out.ok
10381058
plugins/sudoers/regress/testsudoers/test1.sh
10391059
plugins/sudoers/regress/testsudoers/test10.out.ok
@@ -1061,6 +1081,12 @@ plugins/sudoers/regress/testsudoers/test2.out.ok
10611081
plugins/sudoers/regress/testsudoers/test2.sh
10621082
plugins/sudoers/regress/testsudoers/test20.out.ok
10631083
plugins/sudoers/regress/testsudoers/test20.sh
1084+
plugins/sudoers/regress/testsudoers/test21.out.ok
1085+
plugins/sudoers/regress/testsudoers/test21.sh
1086+
plugins/sudoers/regress/testsudoers/test22.out.ok
1087+
plugins/sudoers/regress/testsudoers/test22.sh
1088+
plugins/sudoers/regress/testsudoers/test23.out.ok
1089+
plugins/sudoers/regress/testsudoers/test23.sh
10641090
plugins/sudoers/regress/testsudoers/test3.out.ok
10651091
plugins/sudoers/regress/testsudoers/test3.sh
10661092
plugins/sudoers/regress/testsudoers/test4.out.ok
@@ -1275,8 +1301,7 @@ src/sudo_intercept_common.c
12751301
src/sudo_noexec.c
12761302
src/sudo_plugin_int.h
12771303
src/sudo_usage.h.in
1278-
src/suspend_nopty.c
1279-
src/tcsetpgrp_nobg.c
1304+
src/suspend_parent.c
12801305
src/tgetpass.c
12811306
src/ttyname.c
12821307
src/utmp.c

Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# SPDX-License-Identifier: ISC
33
#
4-
# Copyright (c) 2010-2015, 2017-2022 Todd C. Miller <[email protected]>
4+
# Copyright (c) 2010-2015, 2017-2023 Todd C. Miller <[email protected]>
55
#
66
# Permission to use, copy, modify, and distribute this software for any
77
# purpose with or without fee is hereby granted, provided that the above
@@ -31,6 +31,7 @@ exec_prefix = @exec_prefix@
3131
bindir = @bindir@
3232
sbindir = @sbindir@
3333
sysconfdir = @sysconfdir@
34+
adminconfdir = @adminconfdir@
3435
libexecdir = @libexecdir@
3536
includedir = @includedir@
3637
datarootdir = @datarootdir@

NEWS

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,96 @@
1+
What's new in Sudo 1.9.14
2+
3+
* Fixed a bug where if the "intercept" or "log_subcmds" sudoers
4+
option was enabled and a sub-command was run where the first
5+
entry of the argument vector didn't match the command being run.
6+
This resulted in commands like "sudo su -" being killed due to
7+
the mismatch. Bug #1050.
8+
9+
* The sudoers plugin now canonicalizes command path names before
10+
matching (where possible). This fixes a bug where sudo could
11+
execute the wrong path if there are multiple symbolic links with
12+
the same target and the same base name in sudoers that a user is
13+
allowed to run. GitHub issue #228.
14+
15+
* Improved command matching when a chroot is specified in sudoers.
16+
The sudoers plugin will now change the root directory id needed
17+
before performing command matching. Previously, the root directory
18+
was simply prepended to the path that was being processed.
19+
20+
* When NETGROUP_BASE is set in the ldap.conf file, sudo will now
21+
perform its own netgroup lookups of the host name instead of
22+
using the system innetgr(3) function. This guarantees that user
23+
and host netgroup lookups are performed using the same LDAP
24+
server (or servers).
25+
26+
* Fixed a bug introduced in sudo 1.9.13 that resulted in a missing
27+
" ; " separator between environment variables and the command
28+
in log entries.
29+
30+
* The visudo utility now displays a warning when it ignores a file
31+
in an include dir such as /etc/sudoers.d.
32+
33+
* When running a command in a pseudo-terminal, sudo will initialize
34+
the terminal settings even if it is the background process.
35+
Previously, sudo only initialized the pseudo-terminal when running
36+
in the foreground. This fixes an issue where a program that
37+
checks the window size would read the wrong value when sudo was
38+
running in the background.
39+
40+
* Fixed a bug where only the first two digits of the TSID field
41+
being was logged. Bug #1046.
42+
43+
* The "log_pty" sudoers option is now enabled by default. To
44+
restore the historic behavior where a command is run in the
45+
user's terminal, add "Defaults !use_pty" to the sudoers file.
46+
GitHub issue #258.
47+
48+
* Sudo's "-b" option now works when the command is run in a
49+
pseudo-terminal.
50+
51+
* When disabling core dumps, sudo now only modifies the soft limit
52+
and leaves the hard limit as-is. This avoids problems on Linux
53+
when sudo does not have CAP_SYS_RESOURCE, which may be the case
54+
when run inside a container. GitHub issue #42.
55+
56+
* Sudo configuration file paths have been converted to colon-separated
57+
lists of paths. This makes it possible to have configuration
58+
files on a read-only file system while still allowing for local
59+
modifications in a different (writable) directory. The new
60+
--enable-adminconf configure option can be used to specify a
61+
directory that is searched for configuration files in preference
62+
to the sysconfdir (which is usually /etc).
63+
64+
* The "intercept_verify" sudoers option is now only applied when
65+
the "intercept" option is set in sudoers. Previously, it was
66+
also applied when "log_subcmds" was enabled.
67+
68+
* The NETGROUP_QUERY ldap.conf parameter can now be disabled for
69+
LDAP servers that do not support querying the nisNetgroup object
70+
by its nisNetgroupTriple attribute, while still allowing sudo to
71+
query the LDAP server directly to determine netgroup membership.
72+
73+
* Fixed a long-standing bug where a sudoers rule without an explicit
74+
runas list allowed the user to run a command as root and any
75+
group instead of just one of the groups that root is a member
76+
of. For example, a rule such as "myuser ALL = ALL" would permit
77+
"sudo -u root -g othergroup" even if root did not belong to
78+
"othergroup".
79+
80+
* Fixed a bug where a sudoers rule with an explicit runas list
81+
allowed a user to run sudo commands as themselves. For example,
82+
a rule such as "myuser ALL = (root) ALL", "myuser" should only
83+
allow commands to be run as root (optionally using one of root's
84+
groups). However, the rule also allowed the user to run
85+
"sudo -u myuser -g myuser command".
86+
87+
* Fixed a bug that prevented the user from specifying a group on
88+
the command line via "sudo -g" if the rule's Runas_Spec contained
89+
a Runas_Alias.
90+
91+
* Sudo now requires a C compiler that conforms to ISO C99 or higher
92+
to build.
93+
194
What's new in Sudo 1.9.13p3
295

396
* Fixed a bug introduced in sudo 1.9.13 that caused a syntax error

0 commit comments

Comments
 (0)