Skip to content

Commit 5d49390

Browse files
authored
Merge pull request #1706 from flatcar/krnowak/pam
Move sys-libs/pam to portage-stable
2 parents 2e94c9f + eb522c7 commit 5d49390

Some content is hidden

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

56 files changed

+1774
-314
lines changed

.github/workflows/portage-stable-packages-list

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ app-shells/gentoo-bashcomp
179179
app-text/asciidoc
180180
app-text/build-docbook-catalog
181181
app-text/docbook-xml-dtd
182+
app-text/docbook-xsl-ns-stylesheets
182183
app-text/docbook-xsl-stylesheets
183184
app-text/mandoc
184185
app-text/manpager
@@ -318,8 +319,8 @@ dev-python/fastjsonschema
318319
dev-python/flit-core
319320
dev-python/gentoo-common
320321
dev-python/gpep517
321-
dev-python/hatchling
322322
dev-python/hatch-vcs
323+
dev-python/hatchling
323324
dev-python/idna
324325
dev-python/installer
325326
dev-python/jaraco-collections
@@ -504,8 +505,8 @@ licenses
504505

505506
media-libs/libpng
506507

507-
net-analyzer/openbsd-netcat
508508
net-analyzer/netperf
509+
net-analyzer/openbsd-netcat
509510
net-analyzer/tcpdump
510511
net-analyzer/traceroute
511512

@@ -633,6 +634,7 @@ sys-apps/util-linux
633634
sys-apps/which
634635
sys-apps/zram-generator
635636

637+
sys-auth/pambase
636638
sys-auth/polkit
637639
sys-auth/sssd
638640

@@ -705,6 +707,7 @@ sys-libs/libunwind
705707
sys-libs/liburing
706708
sys-libs/libxcrypt
707709
sys-libs/ncurses
710+
sys-libs/pam
708711
sys-libs/readline
709712
sys-libs/talloc
710713
sys-libs/tdb

build_library/prod_image_util.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,14 @@ create_prod_image() {
158158
L+ /etc/ld.so.conf - - - - ../usr/lib/ld.so.conf
159159
EOF
160160

161-
# Move the PAM configuration into /usr
162-
sudo mkdir -p ${root_fs_dir}/usr/lib/pam.d
163-
sudo mv -n ${root_fs_dir}/etc/pam.d/* ${root_fs_dir}/usr/lib/pam.d/
164-
sudo rmdir ${root_fs_dir}/etc/pam.d
161+
local -a bad_pam_files
162+
mapfile -t -d '' bad_pam_files < <(find "${root_fs_dir}"/etc/security "${root_fs_dir}"/etc/pam.d ! -type d ! -name '.keep*' -print0)
163+
if [[ ${#bad_pam_files[@]} -gt 0 ]]; then
164+
error "Found following PAM config files: ${bad_pam_files[@]#"${root_fs_dir}"}"
165+
error "Expected them to be either removed or, better, vendored (/etc/pam.d files should be in /usr/lib/pam, /etc/security files should be in /usr/lib/pam/security)."
166+
error "Vendoring can be done with vendorize_pam_files inside a post_src_install hook for the package that installed the config file."
167+
die "PAM config errors spotted"
168+
fi
165169

166170
# Remove source locale data, only need to ship the compiled archive.
167171
sudo rm -rf ${root_fs_dir}/usr/share/i18n/

build_packages

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,18 @@ if [[ "${FLAGS_usepkgonly}" -eq "${FLAGS_FALSE}" ]]; then
266266
# lvm2[udev] -> virtual/udev -> systemd[cryptsetup] -> cryptsetup -> lvm2
267267
# lvm2[systemd] -> systemd[cryptsetup] -> cryptsetup -> lvm2
268268
# systemd[cryptsetup] -> cryptsetup[udev] -> virtual/udev -> systemd
269+
# systemd[tpm] -> tpm2-tss -> util-linux[udev] -> virtual/udev -> systemd
269270
# curl[http2] -> nghttp2[systemd] -> systemd[curl] -> curl
271+
# sys-libs/pam[systemd] -> sys-apps/system[pam] -> sys-libs/pam
272+
# not dropping pam from sys-apps/systemd, otherwise we would need
273+
# to drop pam from sys-auth/pambase
270274
break_dep_loop sys-apps/util-linux udev,systemd,cryptsetup \
271275
sys-fs/cryptsetup udev \
272276
sys-fs/lvm2 udev,systemd \
273277
sys-apps/systemd cryptsetup,tpm \
274278
net-misc/curl http2 \
275-
net-libs/nghttp2 systemd
279+
net-libs/nghttp2 systemd \
280+
sys-libs/pam systemd
276281
fi
277282

278283
if [[ "${FLAGS_only_resolve_circular_deps}" -eq "${FLAGS_TRUE}" ]]; then
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- pam ([CVE-2024-22365](https://nvd.nist.gov/vuln/detail/CVE-2024-22365), [CVE-2024-10041](https://nvd.nist.gov/vuln/detail/CVE-2024-10041), [CVE-2024-10963](https://nvd.nist.gov/vuln/detail/CVE-2024-10963), [CVE-2025-6020](https://nvd.nist.gov/vuln/detail/CVE-2025-6020))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- base, dev: pam ([1.7.1](https://github.com/linux-pam/linux-pam/releases/tag/v1.7.1) (includes [1.7.0](https://github.com/linux-pam/linux-pam/releases/tag/v1.7.0), [1.6.1](https://github.com/linux-pam/linux-pam/releases/tag/v1.6.1), [1.6.0](https://github.com/linux-pam/linux-pam/releases/tag/v1.6.0)))
2+
- base, dev: pambase ([20251013](https://gitweb.gentoo.org/proj/pambase.git/log/?h=pambase-20251013))

sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/manglefs.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ cd "${rootfs}"
88

99
# Move stuff out of /etc. The systemd unit files are patched to create
1010
# symlinks from /etc to those directories.
11-
mkdir -p usr/lib/pam.d
12-
mv etc/pam.d/vmtoolsd usr/lib/pam.d/vmtoolsd
1311
mkdir -p usr/share/flatcar/oem-vmware
1412
mv etc/vmware-tools usr/share/flatcar/oem-vmware/vmware-tools
1513

sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-admin/sudo

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
cros_post_src_install_keep_etc_sudoers_d() {
2-
# Flatcar: Build system installs /etc/sudoers.d, let's make
3-
# sure we keep having it.
1+
cros_post_src_install_flatcar_modifications() {
2+
# Build system installs /etc/sudoers.d, let's make sure we keep
3+
# having it.
44
#
55
# Upstream PR: https://github.com/gentoo/gentoo/pull/37397
66
keepdir /etc/sudoers.d
7+
8+
# Move pam files to /usr.
9+
vendorize_pam_files
710
}
811

912
# We don't ship OpenLDAP schemas (why?) and we provide sudo.conf
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cros_post_src_install_vendorize_pam() {
2+
vendorize_pam_files
3+
}

sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-libs/cyrus-sasl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
# obviously won't work in case of cross-compilation, so we state up
44
# front that SPNEGO is supported.
55
export ac_cv_gssapi_supports_spnego=yes
6+
7+
cros_post_src_install_vendorize_pam() {
8+
vendorize_pam_files
9+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cros_post_src_install_vendorize_pam() {
2+
vendorize_pam_files
3+
}

0 commit comments

Comments
 (0)