nscd: sync some patches
This commit is contained in:
parent
3033e23bdd
commit
12e71eb1de
40
fix-Segmentation-fault-in-nss-module.patch
Normal file
40
fix-Segmentation-fault-in-nss-module.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From f5b9e0f2a8ada29cebeb6e51cbcbea396375ab26 Mon Sep 17 00:00:00 2001
|
||||||
|
From: huangyu <huangyu106@huawei.com>
|
||||||
|
Date: Wed, 7 Dec 2022 14:35:26 +0800
|
||||||
|
Subject: [PATCH] fix Segmentation fault in nss module
|
||||||
|
|
||||||
|
Signed-off-by: huangyu <huangyu106@huawei.com>
|
||||||
|
---
|
||||||
|
nss/nss_module.c | 2 +-
|
||||||
|
nss/nsswitch.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/nss/nss_module.c b/nss/nss_module.c
|
||||||
|
index b28cb94a..bb2807e9 100644
|
||||||
|
--- a/nss/nss_module.c
|
||||||
|
+++ b/nss/nss_module.c
|
||||||
|
@@ -352,7 +352,7 @@ nss_load_all_libraries (enum nss_database service)
|
||||||
|
{
|
||||||
|
nss_action_list ni = NULL;
|
||||||
|
|
||||||
|
- if (__nss_database_get (service, &ni))
|
||||||
|
+ if (__nss_database_get (service, &ni) && ni != NULL)
|
||||||
|
while (ni->module != NULL)
|
||||||
|
{
|
||||||
|
__nss_module_load (ni->module);
|
||||||
|
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
|
||||||
|
index 6b7d4c78..c9d7e372 100644
|
||||||
|
--- a/nss/nsswitch.c
|
||||||
|
+++ b/nss/nsswitch.c
|
||||||
|
@@ -133,7 +133,7 @@ libc_hidden_def (__nss_next2)
|
||||||
|
void *
|
||||||
|
__nss_lookup_function (nss_action_list ni, const char *fct_name)
|
||||||
|
{
|
||||||
|
- if (ni->module == NULL)
|
||||||
|
+ if (ni == NULL || ni->module == NULL)
|
||||||
|
return NULL;
|
||||||
|
return __nss_module_get_function (ni->module, fct_name);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
38
fix_nss_database_check_reload_and_get_memleak.patch
Normal file
38
fix_nss_database_check_reload_and_get_memleak.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 66c23fa97a1bf8819051f1c358ae5eb38eeefae2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: huangyu <huangyu106@huawei.com>
|
||||||
|
Date: Tue, 6 Sep 2022 11:55:40 +0800
|
||||||
|
Subject: [PATCH] huawei-fix_nss_database_check_reload_and_get_memleak.patch
|
||||||
|
The return nss_database_check_reload_adn_get (local, actions, db) does not check
|
||||||
|
whether the local value is empty before invoking the local interface.
|
||||||
|
|
||||||
|
Signed-off-by: huangyu <huangyu106@huawei.com>
|
||||||
|
---
|
||||||
|
nss/nss_database.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/nss/nss_database.c b/nss/nss_database.c
|
||||||
|
index 54561f03..a503890a 100644
|
||||||
|
--- a/nss/nss_database.c
|
||||||
|
+++ b/nss/nss_database.c
|
||||||
|
@@ -254,6 +254,8 @@ __nss_configure_lookup (const char *dbname, const char *service_line)
|
||||||
|
__nss_database_get (db, &result);
|
||||||
|
|
||||||
|
local = nss_database_state_get ();
|
||||||
|
+ if (local == NULL)
|
||||||
|
+ return -1;
|
||||||
|
|
||||||
|
result = __nss_action_parse (service_line);
|
||||||
|
if (result == NULL)
|
||||||
|
@@ -399,6 +401,9 @@ nss_database_check_reload_and_get (struct nss_database_state *local,
|
||||||
|
/* Acquire MO is needed because the thread that sets reload_disabled
|
||||||
|
may have loaded the configuration first, so synchronize with the
|
||||||
|
Release MO store there. */
|
||||||
|
+ if (local == NULL)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
if (atomic_load_acquire (&local->data.reload_disabled))
|
||||||
|
{
|
||||||
|
*result = local->data.services[database_index];
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -65,7 +65,7 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
Name: glibc
|
Name: glibc
|
||||||
Version: 2.38
|
Version: 2.38
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: The GNU libc libraries
|
Summary: The GNU libc libraries
|
||||||
License: %{all_license}
|
License: %{all_license}
|
||||||
URL: http://www.gnu.org/software/glibc/
|
URL: http://www.gnu.org/software/glibc/
|
||||||
@ -103,6 +103,8 @@ Patch9014: strcmp-delete-align-for-loop_aligned.patch
|
|||||||
Patch9015: add-pthread_cond_clockwait-GLIBC_2_28.patch
|
Patch9015: add-pthread_cond_clockwait-GLIBC_2_28.patch
|
||||||
Patch9016: add-GB18030-2022-charmap-BZ-30243.patch
|
Patch9016: add-GB18030-2022-charmap-BZ-30243.patch
|
||||||
Patch9017: 0001-Optimizing-__random-for-single-threaded-scenarios.patch
|
Patch9017: 0001-Optimizing-__random-for-single-threaded-scenarios.patch
|
||||||
|
Patch9018: fix-Segmentation-fault-in-nss-module.patch
|
||||||
|
Patch9019: fix_nss_database_check_reload_and_get_memleak.patch
|
||||||
|
|
||||||
Provides: ldconfig rtld(GNU_HASH) bundled(gnulib)
|
Provides: ldconfig rtld(GNU_HASH) bundled(gnulib)
|
||||||
|
|
||||||
@ -1262,6 +1264,10 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 7 2023 zhanghao<zhanghao383@huawei.com> - 2.38-3
|
||||||
|
- fix Segmentation fault in nss module
|
||||||
|
- fix nss database check reload and get memleak
|
||||||
|
|
||||||
* Wed Aug 2 2023 chenhaixiang<chenhaixiang3@huawei.com> - 2.38-2
|
* Wed Aug 2 2023 chenhaixiang<chenhaixiang3@huawei.com> - 2.38-2
|
||||||
- use the released glibc 2.38 version
|
- use the released glibc 2.38 version
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user