From a1309c2bd0e7469158dfa5dec3334054fad2ed03 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 6 Feb 2015 10:43:19 -0800 Subject: Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. --- sunrpc/Makefile | 2 ++ sunrpc/Versions | 9 +++++++++ sunrpc/getrpcbyname.c | 32 ++++++++++++++++++++++++++++++++ sunrpc/getrpcbyname_r.c | 31 +++++++++++++++++++++++++++++++ sunrpc/getrpcbynumber.c | 32 ++++++++++++++++++++++++++++++++ sunrpc/getrpcbynumber_r.c | 31 +++++++++++++++++++++++++++++++ sunrpc/getrpcent.c | 28 ++++++++++++++++++++++++++++ sunrpc/getrpcent_r.c | 32 ++++++++++++++++++++++++++++++++ 8 files changed, 197 insertions(+) create mode 100644 sunrpc/getrpcbyname.c create mode 100644 sunrpc/getrpcbyname_r.c create mode 100644 sunrpc/getrpcbynumber.c create mode 100644 sunrpc/getrpcbynumber_r.c create mode 100644 sunrpc/getrpcent.c create mode 100644 sunrpc/getrpcent_r.c (limited to 'sunrpc') diff --git a/sunrpc/Makefile b/sunrpc/Makefile index b65f2f5..c29f4a9 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -76,6 +76,8 @@ routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \ pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \ svc_simple xdr_float xdr_rec publickey authdes_prot \ des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \ + getrpcent getrpcbyname getrpcbynumber \ + getrpcent_r getrpcbyname_r getrpcbynumber_r \ clnt_unix svc_unix create_xid $(need-export-routines) ifneq ($(link-obsolete-rpc),yes) # We only add the RPC for compatibility to libc.so. diff --git a/sunrpc/Versions b/sunrpc/Versions index a11dd8d..77bc6a4 100644 --- a/sunrpc/Versions +++ b/sunrpc/Versions @@ -21,8 +21,13 @@ libc { clnt_perror; clnt_spcreateerror; clnt_sperrno; clnt_sperror; clntraw_create; clnttcp_create; clntudp_bufcreate; clntudp_create; + # e* + endrpcent; + # g* get_myaddress; getpublickey; getsecretkey; + getrpcbyname; getrpcbyname_r; getrpcbynumber; getrpcbynumber_r; + getrpcent; getrpcent_r; getrpcport; # p* pmap_getmaps; pmap_getport; pmap_rmtcall; pmap_set; pmap_unset; @@ -31,6 +36,7 @@ libc { registerrpc; # s* + setrpcent; svc_exit; svc_getreq; svc_getreqset; svc_register; svc_run; svc_sendreply; svc_unregister; svcerr_auth; svcerr_decode; svcerr_noproc; svcerr_noprog; svcerr_progvers; svcerr_systemerr; @@ -106,6 +112,9 @@ libc { xdr_hyper; xdr_u_hyper; xdr_longlong_t; xdr_u_longlong_t; xdr_int64_t; xdr_uint64_t; } + GLIBC_2.1.2 { + getrpcbyname_r; getrpcbynumber_r; getrpcent_r; + } GLIBC_2.2 { svc_getreq_common; svc_getreq_poll; svc_max_pollfd; svc_pollfd; } diff --git a/sunrpc/getrpcbyname.c b/sunrpc/getrpcbyname.c new file mode 100644 index 0000000..d21abc5 --- /dev/null +++ b/sunrpc/getrpcbyname.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + + +#define LOOKUP_TYPE struct rpcent +#define FUNCTION_NAME getrpcbyname +#define DATABASE_NAME rpc +#define ADD_PARAMS const char *name +#define ADD_VARIABLES name +#define BUFLEN 1024 + +/* There is no nscd support for the rpc file. */ +#undef USE_NSCD + +#include "../nss/getXXbyYY.c" diff --git a/sunrpc/getrpcbyname_r.c b/sunrpc/getrpcbyname_r.c new file mode 100644 index 0000000..ff43ad4 --- /dev/null +++ b/sunrpc/getrpcbyname_r.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + + +#define LOOKUP_TYPE struct rpcent +#define FUNCTION_NAME getrpcbyname +#define DATABASE_NAME rpc +#define ADD_PARAMS const char *name +#define ADD_VARIABLES name + +/* There is no nscd support for the rpc file. */ +#undef USE_NSCD + +#include "../nss/getXXbyYY_r.c" diff --git a/sunrpc/getrpcbynumber.c b/sunrpc/getrpcbynumber.c new file mode 100644 index 0000000..e6930da --- /dev/null +++ b/sunrpc/getrpcbynumber.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + + +#define LOOKUP_TYPE struct rpcent +#define FUNCTION_NAME getrpcbynumber +#define DATABASE_NAME rpc +#define ADD_PARAMS int number +#define ADD_VARIABLES number +#define BUFLEN 1024 + +/* There is no nscd support for the rpc file. */ +#undef USE_NSCD + +#include "../nss/getXXbyYY.c" diff --git a/sunrpc/getrpcbynumber_r.c b/sunrpc/getrpcbynumber_r.c new file mode 100644 index 0000000..f6efaf1 --- /dev/null +++ b/sunrpc/getrpcbynumber_r.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + + +#define LOOKUP_TYPE struct rpcent +#define FUNCTION_NAME getrpcbynumber +#define DATABASE_NAME rpc +#define ADD_PARAMS int number +#define ADD_VARIABLES number + +/* There is no nscd support for the rpc file. */ +#undef USE_NSCD + +#include "../nss/getXXbyYY_r.c" diff --git a/sunrpc/getrpcent.c b/sunrpc/getrpcent.c new file mode 100644 index 0000000..e72ea8d --- /dev/null +++ b/sunrpc/getrpcent.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + + +#define LOOKUP_TYPE struct rpcent +#define GETFUNC_NAME getrpcent +#define BUFLEN 1024 + +/* There is no nscd support for the rpc file. */ +#undef USE_NSCD + +#include "../nss/getXXent.c" diff --git a/sunrpc/getrpcent_r.c b/sunrpc/getrpcent_r.c new file mode 100644 index 0000000..9c1a65c --- /dev/null +++ b/sunrpc/getrpcent_r.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + + +#define LOOKUP_TYPE struct rpcent +#define SETFUNC_NAME setrpcent +#define GETFUNC_NAME getrpcent +#define ENDFUNC_NAME endrpcent +#define DATABASE_NAME rpc +#define STAYOPEN int stayopen +#define STAYOPEN_VAR stayopen + +/* There is no nscd support for the rpc file. */ +#undef USE_NSCD + +#include "../nss/getXXent_r.c" -- cgit v1.1