From patchwork Wed Feb 12 14:34:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1236894 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-109584-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=NHrq1m4f; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=T3L1n7Qu; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Hhx25N90z9s1x for ; Thu, 13 Feb 2020 01:34:30 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:message-id:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=S03 11dYRppGnCoXLCcvVEERlf5G8wC/aMUeBkC9vjtlW3aEJxRgqgVUCou3T3ELlPhN UXHbAf4XUs8kk1uM/noK4m48i8bLuU/4l1bVoSSUhsbaPJrRsZzGf/KNa1OE02FE lR8iYBM//7P6qQoUTt0skNFmIWwudX4AISrVpj4k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:message-id:date:mime-version :content-type:content-transfer-encoding; s=default; bh=oeRWeV2Dw soYjFog1toKsm9m5G0=; b=NHrq1m4fL0E29dEh5FZzUoXTLu8JbjUmsULfClWnM PJXOX9BRy48qF0pzZYTp7ul0Yt9qrv5PhHiiOqojqeIh1KMmG4XiZggEadYwve3w EGYOI5X3Ss7mh6+r7Ff+AVjL8fT92kc+csKO4R9db5ajxN/Q2uHpq3G5t/3YLi9a 58= Received: (qmail 33502 invoked by alias); 12 Feb 2020 14:34:24 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 33493 invoked by uid 89); 12 Feb 2020 14:34:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=(unknown) X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581518060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HdxxQV1nYDsJIpcIixVFXywcjsoKNbsBamvMf4f3b88=; b=T3L1n7QutxN+DBONaokEWJc1hBKc9cvHPWJiU1TxepMrGLZ0ATk5AX59WRWvH9+46oeP12 IgfhAYR/P+OBP8cNa4CIjcSl7S/BhwwSsiFFcw3SgAe++du7pJohg9U1nlBwmdsK+sjBwJ 4tFVgaNzboC9rX1KK9naeScNZaIjFpk= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 0/7] More type safety for NSS modules X-From-Line: bf0041b252ee744229fd2ee672af1402ba70db5a Mon Sep 17 00:00:00 2001 Message-Id: Date: Wed, 12 Feb 2020 15:34:14 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com This series adds a macro NSS_DECLARE_MODULE_FUNCTIONS macro to . 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_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(-)