diff options
author | Manuel Reimer | 2021-02-07 19:54:35 +0100 |
---|---|---|
committer | Manuel Reimer | 2021-02-07 19:54:35 +0100 |
commit | 7a6dd8ad5b10bbf0d04e75461cea44f8388b7be0 (patch) | |
tree | b75cb259b1a7652ba85c180347000653e5f0a66e | |
parent | 9ba41176e477fdf89ae0691c9be89b1e8a599a65 (diff) | |
download | aur-7a6dd8ad5b10bbf0d04e75461cea44f8388b7be0.tar.gz |
wine-lol-glibc: Add bz27343.patch
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | bz27343.patch | 48 |
3 files changed, 54 insertions, 8 deletions
@@ -17,8 +17,10 @@ pkgbase = wine-lol-glibc options = !strip options = staticlibs source = https://ftp.gnu.org/gnu/glibc/glibc-2.33.tar.xz + source = bz27343.patch source = wine-lol-poc1-glibc.diff::https://bugs.winehq.org/attachment.cgi?id=64482 md5sums = 390bbd889c7e8e8a7041564cb6b27cca + md5sums = cfe57018d06bf748b8ca1779980fef33 md5sums = 65e6d204ab9ad787c8dce999c4ba5c17 pkgname = wine-lol-glibc @@ -19,8 +19,10 @@ options=(!strip staticlibs) #_commit=067fc32968b601493f4b247a3ac00caeea3f3d61 #source=(git+https://sourceware.org/git/glibc.git#commit=$_commit source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz + bz27343.patch wine-lol-poc1-glibc.diff::https://bugs.winehq.org/attachment.cgi?id=64482) md5sums=('390bbd889c7e8e8a7041564cb6b27cca' + 'cfe57018d06bf748b8ca1779980fef33' '65e6d204ab9ad787c8dce999c4ba5c17') prepare() { @@ -29,14 +31,8 @@ prepare() { [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc cd glibc - local i; for i in ${source[@]}; do - case ${i%::*} in - *.patch) - echo " -> Applying ${i}" - patch -p1 -i "$srcdir/${i}" - ;; - esac - done + # commit c3479fb7939898ec22c655c383454d6e8b982a67 + patch -p1 -i "$srcdir"/bz27343.patch # Add wine-lol glibc hack patch -p1 -i "$srcdir/wine-lol-poc1-glibc.diff" diff --git a/bz27343.patch b/bz27343.patch new file mode 100644 index 000000000000..3db6a9440eb2 --- /dev/null +++ b/bz27343.patch @@ -0,0 +1,48 @@ +From c3479fb7939898ec22c655c383454d6e8b982a67 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Fri, 5 Feb 2021 07:32:18 +0000 +Subject: [PATCH] nsswitch: return result when nss database is locked [BZ + #27343] + +Before the change nss_database_check_reload_and_get() did not populate +the '*result' value when it returned success in a case of chroot +detection. This caused initgroups() to use garage pointer in the +following test (extracted from unbound): + +``` + +int main() { + // load some NSS modules + struct passwd * pw = getpwnam("root"); + + chdir("/tmp"); + chroot("/tmp"); + chdir("/"); + // access nsswitch.conf in a chroot + initgroups("root", 0); +} +``` + +Reviewed-by: DJ Delorie <dj@redhat.com> +--- + nss/nss_database.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/nss/nss_database.c b/nss/nss_database.c +index cf0306adc4..e1bef6bd75 100644 +--- a/nss/nss_database.c ++++ b/nss/nss_database.c +@@ -398,8 +398,9 @@ nss_database_check_reload_and_get (struct nss_database_state *local, + && (str.st_ino != local->root_ino + || str.st_dev != local->root_dev))) + { +- /* Change detected; disable reloading. */ ++ /* Change detected; disable reloading and return current state. */ + atomic_store_release (&local->data.reload_disabled, 1); ++ *result = local->data.services[database_index]; + __libc_lock_unlock (local->lock); + __nss_module_disable_loading (); + return true; +-- +2.27.0 + |