forked from rpms/glibc
3aa2e0d8ed
* Tue Jun 14 2022 Arjun Shankar <arjun@redhat.com> - 2.34-38
- Sync with upstream branch release/2.34/master,
commit 94ab2088c37d8e4285354af120b7ed6b887b9e53:
- nss: handle stat failure in check_reload_and_get (BZ #28752)
- nss: add assert to DB_LOOKUP_FCT (BZ #28752)
- nios2: Remove _dl_skip_args usage (BZ# 29187)
- hppa: Remove _dl_skip_args usage (BZ# 29165)
- nptl: Fix __libc_cleanup_pop_restore asynchronous restore (BZ#29214)
Related: #2091541
Related: #2080163 (actually fixed in 601650f878
, two commits ago)
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
commit 368c5c3e001a37571b61ab342f2b654c3d23643d
|
|
Author: Sam James <sam@gentoo.org>
|
|
Date: Sun Jun 5 04:57:09 2022 +0100
|
|
|
|
nss: add assert to DB_LOOKUP_FCT (BZ #28752)
|
|
|
|
It's interesting if we have a null action list,
|
|
so an assert is worthwhile.
|
|
|
|
Suggested-by: DJ Delorie <dj@redhat.com>
|
|
Signed-off-by: Sam James <sam@gentoo.org>
|
|
Reviewed-by: DJ Delorie <dj@redhat.com>
|
|
(cherry picked from commit 3fdf0a205b622e40fa7e3c4ed1e4ed4d5c6c5380)
|
|
|
|
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
|
|
index dbc87868dd408d9f..343fd9869bd12714 100644
|
|
--- a/nss/XXX-lookup.c
|
|
+++ b/nss/XXX-lookup.c
|
|
@@ -16,6 +16,7 @@
|
|
License along with the GNU C Library; if not, see
|
|
<https://www.gnu.org/licenses/>. */
|
|
|
|
+#include <assert.h>
|
|
#include "nsswitch.h"
|
|
|
|
/*******************************************************************\
|
|
@@ -55,6 +56,10 @@ DB_LOOKUP_FCT (nss_action_list *ni, const char *fct_name, const char *fct2_name,
|
|
|
|
*ni = DATABASE_NAME_SYMBOL;
|
|
|
|
+ /* We want to know about it if we've somehow got a NULL action list;
|
|
+ in the past, we had bad state if seccomp interfered with setup. */
|
|
+ assert(*ni != NULL);
|
|
+
|
|
return __nss_lookup (ni, fct_name, fct2_name, fctp);
|
|
}
|
|
libc_hidden_def (DB_LOOKUP_FCT)
|