Skip to content

Commit 7e1795b

Browse files
committed
Merge sudo 1.9.9 from tip.
--HG-- branch : 1.9
2 parents dc8067c + be45d8f commit 7e1795b

File tree

307 files changed

+34509
-19805
lines changed

Some content is hidden

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

307 files changed

+34509
-19805
lines changed

.circleci/config.yml

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
version: 2.1
2+
3+
jobs:
4+
build:
5+
description: Configure, build and package sudo
6+
parameters:
7+
ldap:
8+
description: if true, build sudo's LDAP support
9+
default: false
10+
type: boolean
11+
wolfssl:
12+
description: if true, build sudo with wolfSSL support
13+
default: false
14+
type: boolean
15+
static_sudoers:
16+
description: if true, build sudoers statically
17+
default: false
18+
type: boolean
19+
logsrvd:
20+
description: if true, build sudo_logsrvd and sudoers client
21+
default: true
22+
type: boolean
23+
intercept:
24+
description: if true, build intercept support
25+
default: true
26+
type: boolean
27+
docker:
28+
- image: docker.io/sudoproject/ubuntu:latest
29+
user: build
30+
steps:
31+
- checkout
32+
- run:
33+
name: "Building and packaging sudo"
34+
command: ./scripts/mkpkg <<# parameters.ldap >>--flavor=ldap --with-sssd --with-sssd-lib=/usr/lib/x86_64-linux-gnu <</ parameters.ldap >><<# parameters.wolfssl >>--enable-wolfssl <</ parameters.wolfssl >><<^ parameters.logsrvd >>--disable-log-server --disable-log-client <</ parameters.logsrvd >><<^ parameters.intercept >>--disable-intercept <</ parameters.intercept >><<# parameters.static_sudoers >>--enable-static-sudoers <</ parameters.static_sudoers >>--enable-warnings --enable-werror --enable-sanitizer
35+
# Save workspace for subsequent jobs (i.e. test)
36+
- persist_to_workspace:
37+
root: .
38+
paths:
39+
- .
40+
test:
41+
description: run sudo tests in a pre-built workspace
42+
docker:
43+
- image: docker.io/sudoproject/ubuntu:latest
44+
user: build
45+
steps:
46+
# Reuse the workspace from the build job
47+
- attach_workspace:
48+
at: .
49+
- run:
50+
name: "Running tests"
51+
command: make check
52+
environment:
53+
# Leak sanitizer requires ptrace, disable it
54+
ASAN_OPTIONS: detect_leaks=0
55+
56+
# Orchestrate our job run sequence
57+
workflows:
58+
version: 2
59+
build_and_test:
60+
jobs:
61+
- build:
62+
name: build-ldap
63+
ldap: true
64+
filters:
65+
branches:
66+
only: main
67+
- build:
68+
name: build-wolfssl
69+
wolfssl: true
70+
filters:
71+
branches:
72+
only: main
73+
- build:
74+
name: build-static-sudoers
75+
static_sudoers: true
76+
filters:
77+
branches:
78+
only: main
79+
- build:
80+
name: build-nologsrvd
81+
logsrvd: false
82+
filters:
83+
branches:
84+
only: main
85+
- build:
86+
name: build-nointercept
87+
logsrvd: false
88+
filters:
89+
branches:
90+
only: main
91+
- test:
92+
name: test-ldap
93+
requires:
94+
- build-ldap
95+
- test:
96+
name: test-wolfssl
97+
requires:
98+
- build-wolfssl
99+
- test:
100+
name: test-static-sudoers
101+
requires:
102+
- build-static-sudoers
103+
- test:
104+
name: test-nologsrvd
105+
requires:
106+
- build-nologsrvd
107+
- test:
108+
name: test-nointercept
109+
requires:
110+
- build-nointercept

.github/workflows/codeql-analysis.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '19 3 * * 2'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'cpp', 'python' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1

.gitignore

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ ChangeLog
2626
PVS-Studio.cfg
2727
uncrustify.files
2828

29-
doc/*.man
30-
doc/*.mdoc
31-
doc/fixman.sed
29+
docs/*.man
30+
docs/*.mdoc
31+
docs/fixman.sed
3232

3333
examples/sudo.conf
3434

@@ -39,6 +39,7 @@ init.d/sudo.conf
3939

4040
src/sudo
4141
src/sesh
42+
src/check_net_ifs
4243
src/check_noexec
4344
src/check_ttyname
4445
src/intercept.exp
@@ -51,6 +52,7 @@ lib/iolog/check_iolog_[a-z]*
5152
lib/iolog/fuzz_iolog_[a-z]*
5253
lib/iolog/host_port_test
5354

55+
lib/util/getgids
5456
lib/util/mksiglist
5557
lib/util/mksiglist.h
5658
lib/util/mksigname

.hgignore

+6-5
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Makefile$
2222
^ChangeLog$
2323
^PVS-Studio\.cfg$
2424
^uncrustify\.files$
25-
^doc/.*\.man$
26-
^doc/.*\.mdoc$
27-
^doc/fixman\.sed$
25+
^docs/.*\.man$
26+
^docs/.*\.mdoc$
27+
^docs/fixman\.sed$
2828

2929
^etc/init\.d/sudo\.conf$
3030

@@ -36,17 +36,18 @@ Makefile$
3636
^pathnames\.h$
3737
^src/sudo$
3838
^src/sesh$
39-
^src/check_(noexec|ttyname)$
39+
^src/check_(net_ifs|noexec|ttyname)$
4040
^src/intercept\.exp$
4141
^src/sudo_usage\.h$
4242

4343
^lib/eventlog/check_wrap$
4444
^lib/eventlog/regress/logwrap/check_wrap.out$
4545

46-
^lib/iolog/check_iolog_(json|mkpath|path|util)$
46+
^lib/iolog/check_iolog_(json|mkpath|path|timing)$
4747
^lib/iolog/fuzz_iolog_(json|legacy|timing)$
4848
^lib/iolog/host_port_test$
4949

50+
^lib/util/getgids$
5051
^lib/util/mksiglist$
5152
^lib/util/mksiglist.h$
5253
^lib/util/mksigname$

0 commit comments

Comments
 (0)