|
|
076f82 |
commit 368c5c3e001a37571b61ab342f2b654c3d23643d
|
|
|
076f82 |
Author: Sam James <sam@gentoo.org>
|
|
|
076f82 |
Date: Sun Jun 5 04:57:09 2022 +0100
|
|
|
076f82 |
|
|
|
076f82 |
nss: add assert to DB_LOOKUP_FCT (BZ #28752)
|
|
|
076f82 |
|
|
|
076f82 |
It's interesting if we have a null action list,
|
|
|
076f82 |
so an assert is worthwhile.
|
|
|
076f82 |
|
|
|
076f82 |
Suggested-by: DJ Delorie <dj@redhat.com>
|
|
|
076f82 |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
076f82 |
Reviewed-by: DJ Delorie <dj@redhat.com>
|
|
|
076f82 |
(cherry picked from commit 3fdf0a205b622e40fa7e3c4ed1e4ed4d5c6c5380)
|
|
|
076f82 |
|
|
|
076f82 |
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
|
|
|
076f82 |
index dbc87868dd408d9f..343fd9869bd12714 100644
|
|
|
076f82 |
--- a/nss/XXX-lookup.c
|
|
|
076f82 |
+++ b/nss/XXX-lookup.c
|
|
|
076f82 |
@@ -16,6 +16,7 @@
|
|
|
076f82 |
License along with the GNU C Library; if not, see
|
|
|
076f82 |
<https://www.gnu.org/licenses/>. */
|
|
|
076f82 |
|
|
|
076f82 |
+#include <assert.h>
|
|
|
076f82 |
#include "nsswitch.h"
|
|
|
076f82 |
|
|
|
076f82 |
/*******************************************************************\
|
|
|
076f82 |
@@ -55,6 +56,10 @@ DB_LOOKUP_FCT (nss_action_list *ni, const char *fct_name, const char *fct2_name,
|
|
|
076f82 |
|
|
|
076f82 |
*ni = DATABASE_NAME_SYMBOL;
|
|
|
076f82 |
|
|
|
076f82 |
+ /* We want to know about it if we've somehow got a NULL action list;
|
|
|
076f82 |
+ in the past, we had bad state if seccomp interfered with setup. */
|
|
|
076f82 |
+ assert(*ni != NULL);
|
|
|
076f82 |
+
|
|
|
076f82 |
return __nss_lookup (ni, fct_name, fct2_name, fctp);
|
|
|
076f82 |
}
|
|
|
076f82 |
libc_hidden_def (DB_LOOKUP_FCT)
|