mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-12 06:10:10 +00:00
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 3fdf0a205b
)
This commit is contained in:
parent
bb4148283f
commit
368c5c3e00
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user