From patchwork Sat Aug 12 12:05:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 22111 Received: (qmail 118093 invoked by alias); 12 Aug 2017 12:05:20 -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 117933 invoked by uid 89); 12 Aug 2017 12:05:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 72827C0B5E88 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer@redhat.com Date: Sat, 12 Aug 2017 14:05:15 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] NSS: Do not use internal_function for functions with hidden aliases User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170812120515.647204027587E@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) Such functions are called across DSO boundaries and should not use a non-standard ABI. 2017-08-12 Florian Weimer * grp/grp-merge.h (__copy_grp, __merge_grp): Remove internal_function. * grp/grp-merge.c (__copy_grp, __merge_grp): Likewise. * inet/netgroup.h (__internal_setnetgrent) (__internal_endnetgrent,__internal_getnetgrent_r): Likewise. * inet/getnetgrent_r.c (__internal_setnetgrent) (__internal_endnetgrent,__internal_getnetgrent_r): Likewise. * nss/XXX-lookup.c (DB_LOOKUP_FCT, DB_COMPAT_FCT): Likewise. * nss/getXXbyYY_r.c (DB_LOOKUP_FCT): Likewise. * nss/getXXent_r.c (DB_LOOKUP_FCT): Likewise. * nss/nsswitch.h (db_lookup_function): Likewise. diff --git a/grp/grp-merge.c b/grp/grp-merge.c index 035e7a604b..df7260857d 100644 --- a/grp/grp-merge.c +++ b/grp/grp-merge.c @@ -36,7 +36,6 @@ }) int -internal_function __copy_grp (const struct group srcgrp, const size_t buflen, struct group *destgrp, char *destbuf, char **endptr) { @@ -117,7 +116,6 @@ libc_hidden_def (__copy_grp) /* Check that the name, GID and passwd fields match, then copy in the gr_mem array. */ int -internal_function __merge_grp (struct group *savedgrp, char *savedbuf, char *savedend, size_t buflen, struct group *mergegrp, char *mergebuf) { diff --git a/grp/grp-merge.h b/grp/grp-merge.h index 1ad9b9a539..f6ee83885b 100644 --- a/grp/grp-merge.h +++ b/grp/grp-merge.h @@ -25,13 +25,11 @@ calling function must free(newbuf). */ int __copy_grp (const struct group srcgrp, const size_t buflen, - struct group *destgrp, char *destbuf, char **endptr) - internal_function; + struct group *destgrp, char *destbuf, char **endptr); /* Merge the member lists of two grp structs together. */ int __merge_grp (struct group *savedgrp, char *savedbuf, char *savedend, - size_t buflen, struct group *mergegrp, char *mergebuf) - internal_function; + size_t buflen, struct group *mergegrp, char *mergebuf); #endif /* _GRP_MERGE_H */ diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c index 1b4eb65b89..a8fc51c1b6 100644 --- a/inet/getnetgrent_r.c +++ b/inet/getnetgrent_r.c @@ -172,7 +172,6 @@ __internal_setnetgrent_reuse (const char *group, struct __netgrent *datap, } int -internal_function __internal_setnetgrent (const char *group, struct __netgrent *datap) { /* Free list of all netgroup names from last run. */ @@ -214,7 +213,6 @@ setnetgrent (const char *group) } void -internal_function __internal_endnetgrent (struct __netgrent *datap) { endnetgrent_hook (datap); @@ -263,7 +261,6 @@ nscd_getnetgrent (struct __netgrent *datap, char *buffer, size_t buflen, #endif int -internal_function __internal_getnetgrent_r (char **hostp, char **userp, char **domainp, struct __netgrent *datap, char *buffer, size_t buflen, int *errnop) diff --git a/inet/netgroup.h b/inet/netgroup.h index 9ad9dfe144..630d2b768a 100644 --- a/inet/netgroup.h +++ b/inet/netgroup.h @@ -70,16 +70,13 @@ struct __netgrent /* The internal netgroup handling functions might be called from outside. */ extern int __internal_setnetgrent (const char *group, - struct __netgrent *datap) - internal_function; + struct __netgrent *datap); libc_hidden_proto (__internal_setnetgrent) -extern void __internal_endnetgrent (struct __netgrent *datap) - internal_function; +extern void __internal_endnetgrent (struct __netgrent *datap); libc_hidden_proto (__internal_endnetgrent) extern int __internal_getnetgrent_r (char **hostp, char **userp, char **domainp, struct __netgrent *datap, - char *buffer, size_t buflen, int *errnop) - internal_function; + char *buffer, size_t buflen, int *errnop); libc_hidden_proto (__internal_getnetgrent_r) #endif /* netgroup.h */ diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c index 5a37fdae08..972a2102bf 100644 --- a/nss/XXX-lookup.c +++ b/nss/XXX-lookup.c @@ -56,12 +56,10 @@ service_user *DATABASE_NAME_SYMBOL attribute_hidden; extern int DB_LOOKUP_FCT (service_user **ni, const char *fct_name, - const char *fct2_name, void **fctp) - internal_function; + const char *fct2_name, void **fctp); libc_hidden_proto (DB_LOOKUP_FCT) int -internal_function DB_LOOKUP_FCT (service_user **ni, const char *fct_name, const char *fct2_name, void **fctp) { @@ -79,7 +77,7 @@ libc_hidden_def (DB_LOOKUP_FCT) #ifndef NO_COMPAT int -internal_function attribute_compat_text_section +attribute_compat_text_section DB_COMPAT_FCT (service_user **ni, const char *fct_name, void **fctp) { return DB_LOOKUP_FCT (ni, fct_name, NULL, fctp); diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index bce80e05dd..c58481ef80 100644 --- a/nss/getXXbyYY_r.c +++ b/nss/getXXbyYY_r.c @@ -180,8 +180,7 @@ typedef enum nss_status (*lookup_function) (ADD_PARAMS, LOOKUP_TYPE *, char *, /* The lookup function for the first entry of this service. */ extern int DB_LOOKUP_FCT (service_user **nip, const char *name, - const char *name2, void **fctp) - internal_function; + const char *name2, void **fctp); libc_hidden_proto (DB_LOOKUP_FCT) diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c index 2710c1cd51..66c38a5245 100644 --- a/nss/getXXent_r.c +++ b/nss/getXXent_r.c @@ -113,8 +113,7 @@ __libc_lock_define_initialized (static, lock) /* The lookup function for the first entry of this service. */ extern int DB_LOOKUP_FCT (service_user **nip, const char *name, - const char *name2, void **fctp) - internal_function; + const char *name2, void **fctp); libc_hidden_proto (DB_LOOKUP_FCT) void diff --git a/nss/nsswitch.h b/nss/nsswitch.h index bd3fbcb082..7da90130ec 100644 --- a/nss/nsswitch.h +++ b/nss/nsswitch.h @@ -168,8 +168,7 @@ extern void __nss_disable_nscd (void (*) (size_t, struct traced_file *)); typedef int (*db_lookup_function) (service_user **, const char *, const char *, - void **) - internal_function; + void **); typedef enum nss_status (*setent_function) (int); typedef enum nss_status (*endent_function) (void); typedef enum nss_status (*getent_function) (void *, char *, size_t,