Skip to content

Commit 84e7ca6

Browse files
committed
Merge sudo 1.9.17 from branch 'main' into sudo-1.9
2 parents 015a0d7 + 5fad16b commit 84e7ca6

File tree

177 files changed

+20257
-13342
lines changed

Some content is hidden

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

177 files changed

+20257
-13342
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: "CodeQL Advanced"
1313

1414
on:
1515
push:
@@ -22,51 +22,69 @@ on:
2222

2323
jobs:
2424
analyze:
25-
name: Analyze
26-
runs-on: ubuntu-latest
25+
name: Analyze (${{ matrix.language }})
26+
runs-on: 'ubuntu-latest'
2727
permissions:
28+
# required for all workflows
29+
security-events: write
30+
31+
# required to fetch internal or private CodeQL packs
32+
packages: read
33+
34+
# only required for workflows in private repositories
2835
actions: read
2936
contents: read
30-
security-events: write
3137

3238
strategy:
3339
fail-fast: false
3440
matrix:
35-
language: [ 'cpp', 'python' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38-
41+
include:
42+
- language: c-cpp
43+
build-mode: autobuild
44+
- language: python
45+
build-mode: none
46+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
47+
# Use `c-cpp` to analyze code written in C, C++ or both
48+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
49+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
50+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
51+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
52+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
53+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
3954
steps:
4055
- name: Checkout repository
41-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
4257

4358
# Initializes the CodeQL tools for scanning.
4459
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
60+
uses: github/codeql-action/init@v3
4661
with:
4762
languages: ${{ matrix.language }}
63+
build-mode: ${{ matrix.build-mode }}
4864
# If you wish to specify custom queries, you can do so here or in a config file.
4965
# By default, queries listed here will override any specified in a config file.
5066
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53-
# queries: security-extended,security-and-quality
5467

55-
56-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57-
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
68+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
69+
# queries: security-extended,security-and-quality
6070

71+
# If the analyze step fails for one of the languages you are analyzing with
72+
# "We were unable to automatically build your code", modify the matrix above
73+
# to set the build mode to "manual" for that language. Then modify this step
74+
# to build your code.
6175
# ℹ️ Command-line programs to run using the OS shell.
6276
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63-
64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
65-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66-
67-
# - run: |
68-
# echo "Run, Build Application using script"
69-
# ./location_of_script_within_repo/buildscript.sh
77+
- if: matrix.build-mode == 'manual'
78+
shell: bash
79+
run: |
80+
echo 'If you are using a "manual" build mode for one or more of the' \
81+
'languages you are analyzing, replace this with the commands to build' \
82+
'your code, for example:'
83+
echo ' make bootstrap'
84+
echo ' make release'
85+
exit 1
7086
7187
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
88+
uses: github/codeql-action/analyze@v3
89+
with:
90+
category: "/language:${{matrix.language}}"

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
fuzz-seconds: 600
3838
output-sarif: true
3939
- name: Upload Crash
40-
uses: actions/upload-artifact@v3
40+
uses: actions/upload-artifact@v4
4141
if: failure() && steps.build.outcome == 'success'
4242
with:
4343
name: artifacts
4444
path: ./out/artifacts
4545
- name: Upload Sarif
4646
if: always() && steps.build.outcome == 'success'
47-
uses: github/codeql-action/upload-sarif@v2
47+
uses: github/codeql-action/upload-sarif@v3
4848
with:
4949
# Path to SARIF file relative to the root of the repository
5050
sarif_file: cifuzz-sarif/results.sarif

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,5 @@ plugins/sudoers/regress/testsudoers/test3.d/root
9898
plugins/python/__pycache__
9999
plugins/python/regress/__pycache__
100100
plugins/python/check_python_examples
101+
102+
scripts/check_man

.hgignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ Makefile$
7777
^plugins/python/__pycache__
7878
^plugins/python/regress/__pycache__
7979
^plugins/python/check_python_examples$
80+
81+
^scripts/check_man$

INSTALL.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,14 @@ Defaults are listed in brackets after the description.
736736
of the "env_reset" Defaults option in sudoers to false.
737737
Sudoers option: !env_reset
738738

739+
--disable-ignore-dot
740+
By default, sudo will not search for a command in the current
741+
working directory, even if "." or "" in present in the PATH
742+
environment variable. If this option is disabled, sudo
743+
will check the current directory last if it appears anywhere
744+
in PATH. The PATH variable itself is not modified.
745+
Sudoers option: ignore_dot
746+
739747
--disable-path-info
740748
Normally, sudo will tell the user when a command could not be found
741749
in their $PATH. Some sites may wish to disable this as it could
@@ -876,11 +884,6 @@ Defaults are listed in brackets after the description.
876884
You must either specify --with-insults or enable insults in the
877885
sudoers file for this to have any effect.
878886

879-
--with-ignore-dot
880-
If set, sudo will ignore "." or "" (current dir) in $PATH.
881-
The $PATH itself is not modified.
882-
Sudoers option: ignore_dot
883-
884887
--with-insults
885888
Define this if you want to be insulted by default for typing
886889
an incorrect password just like the original sudo(8).

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Sudo is distributed under the following license:
22

3-
Copyright (c) 1994-1996, 1998-2024
3+
Copyright (c) 1994-1996, 1998-2025
44
Todd C. Miller <[email protected]>
55

66
Permission to use, copy, modify, and distribute this software for any

MANIFEST

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ lib/util/lbuf.c
275275
lib/util/localtime_r.c
276276
lib/util/locking.c
277277
lib/util/logfac.c
278+
lib/util/login_max.c
278279
lib/util/logpri.c
279280
lib/util/memrchr.c
280281
lib/util/mkdir_parents.c
@@ -1274,10 +1275,13 @@ po/uk.mo
12741275
po/uk.po
12751276
po/vi.mo
12761277
po/vi.po
1278+
po/yue.mo
1279+
po/yue.po
12771280
po/zh_CN.mo
12781281
po/zh_CN.po
12791282
po/zh_TW.mo
12801283
po/zh_TW.po
1284+
scripts/check_man.in
12811285
scripts/config.guess
12821286
scripts/config.sub
12831287
scripts/generate_test_coverage.sh

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ XGETTEXT_OPTS = -F -k_ -kN_ -kU_ --copyright-holder="Todd C. Miller" \
9696
--flag sudo_lbuf_append_quoted:3:c-format --foreign-user
9797

9898
# Default cppcheck options when run from the top-level Makefile
99-
CPPCHECK_OPTS = -q --enable=warning,performance,portability --suppress=constStatement --suppress=compareBoolExpressionWithInt --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
99+
CPPCHECK_OPTS = -q --enable=warning,performance,portability --suppress=constStatement --suppress=compareBoolExpressionWithInt --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_PATH_MAX -U__NBBY
100100

101101
# Default splint options when run from the top-level Makefile
102102
SPLINT_OPTS = -D__restrict= -checks

NEWS

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
1+
What's new in Sudo 1.9.17
2+
3+
* Sudo now uses the NODEV macro consistently. Bug #1074.
4+
5+
* Fixed a bug where the "ALL" command in a sudoers rule would
6+
override a previous NOSETENV tag. Command tags are inherited
7+
from previous Cmnds in a Cmnd_Spec_List. There is a special
8+
case for the SETENV tag with the "ALL" command, where SETENV is
9+
implied if no explicit SETENV or NOSETENV tag is specified. This
10+
special case did not take into account that a NOSETENV tag that
11+
was inherited should override this behavior.
12+
13+
* If sudo is run via ssh without a terminal and a password is
14+
required, it now suggest using ssh's "-t" option.
15+
16+
* Fixed the display of timeout values in the "sudo -V" output
17+
on systems without a C99-compliant snprintf() function.
18+
19+
* Quieted a number of minor Coverity warnings.
20+
21+
* Fixed a problem running sudo from a serial console on Linux when
22+
the command is run in a pseudo-terminal (the default).
23+
24+
* Fixed a crash in sudo which could occur if there was a fatal
25+
error after the user was validated but before the command was
26+
actually run.
27+
28+
* Fixed a number of man page style warnings. The "lint" make target
29+
in the docs directory will now run groff with warnings enabled
30+
if it is available. Bug #1075.
31+
32+
* The "ignore_dot" sudoers setting is now on by default. There
33+
is now a "--disable-ignore-dot" configure option to disable it.
34+
The "--with-ignore-dot" configure option has been deprecated.
35+
36+
* Fixed a problem with the "pwfeedback" option where an initial
37+
backspace would reduce the maximum length allowed for the password.
38+
GitHub issue #439.
39+
40+
* Fixed minor grammar and spelling problems in the man pages.
41+
42+
* Fixed a bug where a user could avoid entering a password for
43+
"sudo -l command" if they specified their own user or group name
44+
via the "-u" or "-g" options.
45+
46+
* Avoid potential password guessing based on timing attacks on
47+
the strcmp() function on systems without PAM or a crypt() function
48+
where plaintext passwords are stored in the shadow password file.
49+
50+
* Fixed a potential information leak where "sudo -l command" could
51+
be used to determine whether an executable exists in a directory
52+
that they do not have search access to.
53+
54+
* Sudo uses TCSAFLUSH, not TCSADRAIN, when disabling echo once
55+
again. A long time ago sudo changed from using TCSAFLUSH to
56+
TCSADRAIN due to some systems having bugs related to TCSAFLUSH.
57+
That should no longer be a concern. Using TCSAFLUSH ensures
58+
that password input that has been received by the kernel, but
59+
not yet read by sudo, will be discarded and not echoed.
60+
61+
* Added the SUDO_TTY environment variable if the user has a terminal.
62+
This can be used to find the user's original tty device when sudo
63+
runs the command in its own pseudo-terminal. GitHub issue #447.
64+
65+
* New Cantonese translation for sudo.
66+
167
What's new in Sudo 1.9.16p2
268

369
* Sudo now passes the terminal device number to the policy plugin
@@ -2285,7 +2351,7 @@ What's new in Sudo 1.8.22
22852351
of the session leader. When the "timestamp_type" option is set
22862352
to "ppid" or when no terminal is available, the start time of
22872353
the parent process is used instead. This significantly reduces
2288-
the likelihood of a time stamp record being re-used when a user
2354+
the likelihood of a time stamp record being reused when a user
22892355
logs out and back in again. Bug #818.
22902356

22912357
* The sudoers time stamp file format is now documented in the new

aclocal.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
1+
# generated automatically by aclocal 1.17 -*- Autoconf -*-
22

3-
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
3+
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
44

55
# This file is free software; the Free Software Foundation
66
# gives unlimited permission to copy and/or distribute it,

0 commit comments

Comments
 (0)