diff options
Diffstat (limited to '9999/0301-Fix-segfault-in-getpwuid-when-stat-fails-BZ-28752.patch')
-rw-r--r-- | 9999/0301-Fix-segfault-in-getpwuid-when-stat-fails-BZ-28752.patch | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/9999/0301-Fix-segfault-in-getpwuid-when-stat-fails-BZ-28752.patch b/9999/0301-Fix-segfault-in-getpwuid-when-stat-fails-BZ-28752.patch index 85cb24a..48036b3 100644 --- a/9999/0301-Fix-segfault-in-getpwuid-when-stat-fails-BZ-28752.patch +++ b/9999/0301-Fix-segfault-in-getpwuid-when-stat-fails-BZ-28752.patch @@ -1,7 +1,7 @@ -From aa1d70e59ee6ad1503bc853da75afb35d51381be Mon Sep 17 00:00:00 2001 +From 7032e8bf35b229ff759286435f1f51b5588b56ed Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Sat, 12 Feb 2022 19:40:58 +0100 -Subject: [PATCH] Fix segfault in getpwuid when stat fails (BZ #28752) +Subject: [PATCH 14/14] Fix segfault in getpwuid when stat fails (BZ #28752) [azanella proposed this patch to sam when discussing the issue, but it's not anywhere upstream yet- dilfridge] @@ -10,14 +10,14 @@ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28752 Bug: https://bugs.gentoo.org/828070 (cherry picked from commit 1bcdcd4fec9bfe2f1d3fef67a43825903f6a5f2b) --- - nss/nss_database.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + nss/nss_database.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nss/nss_database.c b/nss/nss_database.c -index d56c5b798d..35846d7ebc 100644 +index d56c5b798d..133682b858 100644 --- a/nss/nss_database.c +++ b/nss/nss_database.c -@@ -424,11 +424,11 @@ nss_database_check_reload_and_get (struct nss_database_state *local, +@@ -424,10 +424,11 @@ nss_database_check_reload_and_get (struct nss_database_state *local, errors here are very unlikely, but the chance that we're entering a container is also very unlikely, so we err on the side of both very unlikely things not happening at the same time. */ @@ -25,15 +25,14 @@ index d56c5b798d..35846d7ebc 100644 - || (local->root_ino != 0 - && (str.st_ino != local->root_ino - || str.st_dev != local->root_dev))) -- { + if (__stat64_time64 ("/", &str) != 0) + return false; + + if (local->root_ino != 0 && (str.st_ino != local->root_ino + || str.st_dev != local->root_dev)) + { /* Change detected; disable reloading and return current state. */ atomic_store_release (&local->data.reload_disabled, 1); - *result = local->data.services[database_index]; -- 2.34.1 |