Skip to content

Commit 2ac9985

Browse files
committed
merge sudo 1.8.26 from tip
--HG-- branch : 1.8
2 parents 89d505e + 4f5acff commit 2ac9985

File tree

309 files changed

+21280
-11753
lines changed

Some content is hidden

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

309 files changed

+21280
-11753
lines changed

.hgignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
~$
2-
\.o$
2+
\.i$
33
\.l[ao]$
44
\.lai$
55
\.mo$
6+
\.o$
7+
\.plog$
68

79
\.diff$
810
\.orig$
@@ -16,6 +18,7 @@ Makefile$
1618
^libtool$
1719

1820
^ChangeLog$
21+
^PVS-Studio.cfg$
1922
^doc/.*\.man$
2023
^doc/.*\.mdoc$
2124
^doc/.*\.man\.sed$
@@ -39,6 +42,6 @@ Makefile$
3942
^lib/util/[a-z0-9_]+_test$
4043
^lib/util/regress/.*\.(out|err)$
4144

42-
^plugins/sudoers/(cvtsudoers|sudoers|sudoreplay|testsudoers|tsdump|visudo|check_[a-z0-9_]+)$
45+
^plugins/sudoers/(cvtsudoers|sudoers|sudoreplay|testsudoers|tsdump|visudo|prologue|check_[a-z0-9_]+)$
4346
^plugins/sudoers/.*\.(out|toke|err|json|ldif|sudo|ldif2sudo)$
4447
^plugins/sudoers/regress/iolog_plugin/iolog$

INSTALL

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,16 @@ Optional features:
365365
Enable potentially offensive sudo insults from the classic
366366
version of sudo.
367367

368+
--enable-pvs-studio
369+
Generate a sample PVS-Studio.cfg file based on the compiler and
370+
platform type. The "pvs-studio" Makefile target can then be
371+
used if PVS-Studio is installed.
372+
368373
Operating system-specific options:
369374
--disable-setreuid
370-
Disable use of the setreuid() function for operating systems
371-
where it is broken. For instance, 4.4BSD has setreuid()
372-
that is not fully functional.
375+
Disable use of the setreuid() function for operating systems
376+
where it is broken. For instance, 4.4BSD has setreuid() that
377+
is not fully functional.
373378

374379
--disable-setresuid
375380
Disable use of the setresuid() function for operating systems

MANIFEST

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ doc/fixmdoc.sh
2828
doc/schema.ActiveDirectory
2929
doc/schema.OpenLDAP
3030
doc/schema.iPlanet
31+
doc/schema.olcSudo
3132
doc/sudo.cat
3233
doc/sudo.conf.cat
3334
doc/sudo.conf.man.in
@@ -132,6 +133,7 @@ lib/util/reallocarray.c
132133
lib/util/regress/atofoo/atofoo_test.c
133134
lib/util/regress/fnmatch/fnm_test.c
134135
lib/util/regress/fnmatch/fnm_test.in
136+
lib/util/regress/getgrouplist/getgrouplist_test.c
135137
lib/util/regress/glob/files
136138
lib/util/regress/glob/globtest.c
137139
lib/util/regress/glob/globtest.in
@@ -314,9 +316,9 @@ plugins/sudoers/interfaces.c
314316
plugins/sudoers/interfaces.h
315317
plugins/sudoers/iolog.c
316318
plugins/sudoers/iolog.h
319+
plugins/sudoers/iolog_files.h
317320
plugins/sudoers/iolog_path.c
318321
plugins/sudoers/iolog_util.c
319-
plugins/sudoers/iolog_util.h
320322
plugins/sudoers/ldap.c
321323
plugins/sudoers/ldap_conf.c
322324
plugins/sudoers/ldap_util.c
@@ -372,6 +374,8 @@ plugins/sudoers/po/nl.mo
372374
plugins/sudoers/po/nl.po
373375
plugins/sudoers/po/pl.mo
374376
plugins/sudoers/po/pl.po
377+
plugins/sudoers/po/pt.mo
378+
plugins/sudoers/po/pt.po
375379
plugins/sudoers/po/pt_BR.mo
376380
plugins/sudoers/po/pt_BR.po
377381
plugins/sudoers/po/ru.mo
@@ -452,6 +456,15 @@ plugins/sudoers/regress/cvtsudoers/test29.out.ok
452456
plugins/sudoers/regress/cvtsudoers/test29.sh
453457
plugins/sudoers/regress/cvtsudoers/test3.out.ok
454458
plugins/sudoers/regress/cvtsudoers/test3.sh
459+
plugins/sudoers/regress/cvtsudoers/test30.out.ok
460+
plugins/sudoers/regress/cvtsudoers/test30.sh
461+
plugins/sudoers/regress/cvtsudoers/test31.conf
462+
plugins/sudoers/regress/cvtsudoers/test31.out.ok
463+
plugins/sudoers/regress/cvtsudoers/test31.sh
464+
plugins/sudoers/regress/cvtsudoers/test32.out.ok
465+
plugins/sudoers/regress/cvtsudoers/test32.sh
466+
plugins/sudoers/regress/cvtsudoers/test33.out.ok
467+
plugins/sudoers/regress/cvtsudoers/test33.sh
455468
plugins/sudoers/regress/cvtsudoers/test4.out.ok
456469
plugins/sudoers/regress/cvtsudoers/test4.sh
457470
plugins/sudoers/regress/cvtsudoers/test5.out.ok
@@ -605,6 +618,7 @@ plugins/sudoers/regress/sudoers/test9.json.ok
605618
plugins/sudoers/regress/sudoers/test9.ldif.ok
606619
plugins/sudoers/regress/sudoers/test9.out.ok
607620
plugins/sudoers/regress/sudoers/test9.toke.ok
621+
plugins/sudoers/regress/testsudoers/group
608622
plugins/sudoers/regress/testsudoers/test1.out.ok
609623
plugins/sudoers/regress/testsudoers/test1.sh
610624
plugins/sudoers/regress/testsudoers/test2.inc
@@ -681,6 +695,8 @@ plugins/system_group/Makefile.in
681695
plugins/system_group/system_group.c
682696
plugins/system_group/system_group.exp
683697
po/README
698+
po/ast.mo
699+
po/ast.po
684700
po/ca.mo
685701
po/ca.po
686702
po/cs.mo
@@ -721,6 +737,8 @@ po/nn.mo
721737
po/nn.po
722738
po/pl.mo
723739
po/pl.po
740+
po/pt.mo
741+
po/pt.po
724742
po/pt_BR.mo
725743
po/pt_BR.po
726744
po/ru.mo

Makefile.in

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2010-2015, 2017 Todd C. Miller <[email protected]>
2+
# Copyright (c) 2010-2015, 2017-2018 Todd C. Miller <[email protected]>
33
#
44
# Permission to use, copy, modify, and distribute this software for any
55
# purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,6 @@
1212
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1313
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1414
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15-
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1615
#
1716

1817
srcdir = @srcdir@
@@ -89,6 +88,11 @@ CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=c
8988
# Default splint options when run from the top-level Makefile
9089
SPLINT_OPTS = -D__restrict= -checks
9190

91+
# Default PVS-studio options when run from the top-level Makefile
92+
PVS_CFG = $(top_srcdir)/PVS-Studio.cfg
93+
PVS_IGNORE = 'V707,V011,V002,V536'
94+
PVS_LOG_OPTS = -a 'GA:1,2' -e -t errorfile -d $(PVS_IGNORE)
95+
9296
all: config.status
9397
for d in $(SUBDIRS); do \
9498
(cd $$d && exec $(MAKE) $@) && continue; \
@@ -131,6 +135,22 @@ cov-upload:
131135

132136
cov-analyze: cov-upload
133137

138+
pvs-studio: config.status
139+
files=; \
140+
rval=0; \
141+
for d in $(SUBDIRS); do \
142+
(cd $$d && exec $(MAKE) PVS_IGNORE="$(PVS_IGNORE)" pvs-log-files) || rval=`expr $$rval + $$?`; \
143+
for f in $$d/*.plog; do \
144+
if test "$$f" != "$$d/*.plog"; then \
145+
files="$$files $$f"; \
146+
fi; \
147+
done; \
148+
done; \
149+
if test $$rval -ne 0; then \
150+
exit $$rval; \
151+
fi; \
152+
plog-converter $(PVS_LOG_OPTS) $$files
153+
134154
install-dirs install-binaries install-includes install-plugin: config.status pre-install
135155
for d in $(SUBDIRS); do \
136156
(cd $$d && exec $(MAKE) "INSTALL_OWNER=$(INSTALL_OWNER)" $@) && continue; \

NEWS

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1+
What's new in Sudo 1.8.26
2+
3+
* Fixed a bug in cvtsudoers when converting to JSON format when
4+
alias expansion is enabled. Bug #853.
5+
6+
* Sudo no long sets the USERNAME environment variable when running
7+
commands. This is a non-standard environment variable that was
8+
set on some older Linux systems.
9+
10+
* Sudo now treats the LOGNAME and USER environment variables (as
11+
well as the LOGIN variable on AIX) as a single unit. If one is
12+
preserved or removed from the environment using env_keep, env_check
13+
or env_delete, so is the other.
14+
15+
* Added support for OpenLDAP's TLS_REQCERT setting in ldap.conf.
16+
17+
* Sudo now logs when the command was suspended and resumed in the
18+
I/O logs. This information is used by sudoreplay to skip the
19+
time suspended when replaying the session unless the new -S flag
20+
is used.
21+
22+
* Fixed documentation problems found by the igor utility. Bug #854.
23+
24+
* Sudo now prints a warning message when there is an error or end
25+
of file while reading the password instead of exiting silently.
26+
27+
* Fixed a bug in the sudoers LDAP back-end parsing the command_timeout,
28+
role, type, privs and limitprivs sudoOptions. This also affected
29+
cvtsudoers conversion from LDIF to sudoers or JSON.
30+
31+
* Fixed a bug that prevented timeout settings in sudoers from
32+
functioning unless a timeout was also specified on the command
33+
line.
34+
35+
* Asturian translation for sudo from translationproject.org.
36+
37+
* When generating LDIF output, cvtsudoers can now be configured
38+
to pad the sudoOrder increment such that the start order is used
39+
as a prefix. Bug #856.
40+
41+
* Fixed a bug introduced in sudo 1.8.25 that prevented sudo from
42+
properly setting the user's groups on AIX. Bug #857.
43+
44+
* If the user specifies a group via sudo's -g option that matches
45+
any of the target user's groups, it is now allowed even if no
46+
groups are present in the Runas_Spec. Previously, it was only
47+
allowed if it matched the target user's primary group.
48+
49+
* The sudoers LDAP back-end now supports negated sudoRunAsUser and
50+
sudoRunAsGroup entries.
51+
52+
* Sudo now provides a proper error message when the "fqdn" sudoers
53+
option is set and it is unable to resolve the local host name.
54+
Bug #859.
55+
56+
* Portuguese translation for sudo and sudoers from translationproject.org.
57+
58+
* Sudo now includes sudoers LDAP schema for the on-line configuration
59+
supported by OpenLDAP.
60+
161
What's new in Sudo 1.8.25p1
262

363
* Fixed a bug introduced in sudo 1.8.25 that caused a crash on

README.LDAP

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ Schema Changes
5757
You must add the appropriate schema to your LDAP server before it
5858
can store sudoers content.
5959

60-
For OpenLDAP, copy the file schema.OpenLDAP to the schema directory
61-
(e.g. /etc/openldap/schema). You must then edit your slapd.conf and
62-
add an include line the new schema, e.g.
60+
For OpenLDAP, there are two options, depending on how slapd is configured.
61+
62+
The first option is to copy the file schema.OpenLDAP to the schema
63+
directory (e.g. /etc/openldap/schema). You must then edit your
64+
slapd.conf and add an include line the new schema, e.g.
6365

6466
# Sudo LDAP schema
6567
include /etc/openldap/schema/sudo.schema
@@ -72,6 +74,22 @@ the attribute 'sudoUser', e.g.
7274

7375
After making the changes to slapd.conf, restart slapd.
7476

77+
The second option is only for OpenLDAP 2.3 and higher where slapd.conf
78+
has been configured to use on-line configuration. If your slapd.conf
79+
file includes the line:
80+
81+
database config
82+
83+
it should be possible to use the schema.olcSudo file.
84+
85+
You can apply schema.olcSudo using the ldapadd utility or another
86+
suitable LDAP browser. For example:
87+
88+
# ldapadd -f schema.olcSudo -H ldap://ldapserver -W -x \
89+
-D cn=Manager,dc=example,dc=com
90+
91+
There is no need to restart slapd when updating on-line configuration.
92+
7593
For Netscape-derived LDAP servers such as SunONE, iPlanet or Fedora Directory,
7694
copy the schema.iPlanet file to the schema directory with the name 99sudo.ldif.
7795

@@ -118,7 +136,7 @@ Import into your directory server. The following example is for
118136
OpenLDAP. If you are using another directory, provide the LDIF
119137
file to your LDAP Administrator.
120138

121-
# ldapadd -f /tmp/sudoers.ldif -h ldapserver \
139+
# ldapadd -f /tmp/sudoers.ldif -H ldap://ldapserver \
122140
-D cn=Manager,dc=example,dc=com -W -x
123141

124142
Step 3:

0 commit comments

Comments
 (0)