From 0fc08156ec6a28826952cdd53ca51dfc636bd623 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Wed, 25 Oct 2023 17:38:45 +0300 Subject: [PATCH] fedora: ensure that /etc/environment always read Adjust PAM configuration --- distro-build/fedora.sh | 6 ++++++ distro-plugins/fedora.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/distro-build/fedora.sh b/distro-build/fedora.sh index e68a081af..556d81c21 100644 --- a/distro-build/fedora.sh +++ b/distro-build/fedora.sh @@ -47,5 +47,11 @@ write_plugin() { TARBALL_SHA256['aarch64']="$(sha256sum "${ROOTFS_DIR}/fedora-aarch64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')" TARBALL_URL['x86_64']="${GIT_RELEASE_URL}/fedora-x86_64-pd-${CURRENT_VERSION}.tar.xz" TARBALL_SHA256['x86_64']="$(sha256sum "${ROOTFS_DIR}/fedora-x86_64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')" + + distro_setup() { + ${TAB}# Fix environment variables on login or su. + ${TAB}authselect opt-out + ${TAB}echo "session required pam_env.so readenv=1" >> /etc/pam.d/system-auth + } EOF } diff --git a/distro-plugins/fedora.sh b/distro-plugins/fedora.sh index 753233133..f586669cb 100644 --- a/distro-plugins/fedora.sh +++ b/distro-plugins/fedora.sh @@ -8,3 +8,9 @@ TARBALL_URL['aarch64']="https://github.com/termux/proot-distro/releases/download TARBALL_SHA256['aarch64']="d6aa1a51f8d1f11a3388ed32a30643410345d5c8d22cb7c33e36cfa60942bbb1" TARBALL_URL['x86_64']="https://github.com/termux/proot-distro/releases/download/v3.15.2/fedora-x86_64-pd-v3.15.2.tar.xz" TARBALL_SHA256['x86_64']="167732ad9389523ca88ca9fdba470413322be15b3110845fa865e17b81e3ffaa" + +distro_setup() { + # Fix environment variables on login or su. + authselect opt-out + echo "session required pam_env.so readenv=1" >> /etc/pam.d/system-auth +}