aboutsummaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-05 04:57:09 +0100
committerDJ Delorie <dj@redhat.com>2022-06-08 21:29:39 -0400
commit3fdf0a205b622e40fa7e3c4ed1e4ed4d5c6c5380 (patch)
tree0c2768d80434a46551f0e71aaafd4c7cb16bab44 /nss
parent2c9af8421d2b4a7fcce163e7bc81a118d22fd346 (diff)
downloadglibc-3fdf0a205b622e40fa7e3c4ed1e4ed4d5c6c5380.zip
glibc-3fdf0a205b622e40fa7e3c4ed1e4ed4d5c6c5380.tar.gz
glibc-3fdf0a205b622e40fa7e3c4ed1e4ed4d5c6c5380.tar.bz2
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>
Diffstat (limited to 'nss')
-rw-r--r--nss/XXX-lookup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
index db95937..bfc57b8 100644
--- a/nss/XXX-lookup.c
+++ b/nss/XXX-lookup.c
@@ -15,6 +15,7 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <assert.h>
#include "nsswitch.h"
/*******************************************************************\
@@ -54,6 +55,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)