This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 0/7] More type safety for NSS modules
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 12 Feb 2020 15:34:14 +0100
- Subject: [PATCH 0/7] More type safety for NSS modules
This series adds a macro NSS_DECLARE_MODULE_FUNCTIONS macro to <nss.h>.
Module authors can use this macro to declare all the possible functions
for a module, and define only the function they need. This avoids type
mismatches in these interfaces.
As a side effect, we now have what is hopefully a complete list of all
such module functions. This should help with re-architecting the
internal NSS functions for nsswitch.conf reloading.
Thanks,
Florian
Florian Weimer (7):
nss_compat: Do not use nss_* names for function pointers
nss: Add function types and NSS_DECLARE_MODULE_FUNCTIONS macro to
<nss.h>
nss_hesiod: Use NSS_DECLARE_MODULE_FUNCTIONS
nss_compat: Use NSS_DECLARE_MODULE_FUNCTIONS
nss_db: Use NSS_DECLARE_MODULE_FUNCTIONS
nss_files: Use NSS_DECLARE_MODULE_FUNCTIONS
nss_dns: Use NSS_DECLARE_MODULE_FUNCTIONS
hesiod/nss_hesiod/hesiod-grp.c | 2 +
hesiod/nss_hesiod/hesiod-proto.c | 2 +
hesiod/nss_hesiod/hesiod-pwd.c | 2 +
hesiod/nss_hesiod/hesiod-service.c | 2 +
nscd/aicache.c | 23 +---
nss/nss.h | 203 ++++++++++++++++++++++++++++-
nss/nss_compat/compat-grp.c | 56 ++++----
nss/nss_compat/compat-initgroups.c | 73 ++++++-----
nss/nss_compat/compat-pwd.c | 58 +++++----
nss/nss_compat/compat-spwd.c | 46 +++----
nss/nss_db/db-init.c | 2 +
nss/nss_db/db-initgroups.c | 1 -
nss/nss_db/nss_db.h | 1 +
nss/nss_files/files-alias.c | 2 +
nss/nss_files/files-ethers.c | 3 +
nss/nss_files/files-grp.c | 3 +
nss/nss_files/files-hosts.c | 2 +
nss/nss_files/files-init.c | 3 +
nss/nss_files/files-initgroups.c | 3 +
nss/nss_files/files-key.c | 2 +
nss/nss_files/files-netgrp.c | 2 +
nss/nss_files/files-network.c | 3 +
nss/nss_files/files-proto.c | 2 +
nss/nss_files/files-pwd.c | 3 +
nss/nss_files/files-rpc.c | 2 +
nss/nss_files/files-service.c | 2 +
nss/nss_files/files-sgrp.c | 3 +
nss/nss_files/files-spwd.c | 3 +
resolv/nss_dns/dns-canon.c | 2 +
resolv/nss_dns/dns-host.c | 2 +
resolv/nss_dns/dns-network.c | 2 +
sysdeps/posix/getaddrinfo.c | 18 +--
32 files changed, 384 insertions(+), 149 deletions(-)
--
2.24.1