summaryrefslogtreecommitdiff
path: root/tirpc/rpc
Commit message (Collapse)AuthorAgeFilesLines
* rpcb_clnt.c add mechanism to try v2 protocol firstlibtirpc-1-3-3-rc3Roberto Bergantinos Corpas2022-07-161-0/+2
| | | | | | | | | | | | | | | | | | | | There have been previous attempts to revert protocol tryout algorithm from v4,v3,v2 to previous v2,v4,v3 : https://www.spinics.net/lists/linux-nfs/msg89228.html Apart from GETADDR/NAT issue originating that proposed change, its possible that some legacy custom applications still use v2 of protocol with libtirpc. The change proposed here, introduces an environment variable "RPCB_V2FIRST" so that, if defined, old behaviour is used. This is more flexible and allow us to selectively pick what application reverts to old behaviour instead of a system-wide change. Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc/types.h: fix android buildHsia-Jun(Randy) Li2022-01-201-0/+5
| | | | | | | Android bionic doesn't those glibc defined types. Signed-off-by: Hsia-Jun(Randy) Li <randy.li@synaptics.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Replace the final SunRPC licenses with BSD licenseslibtirpc-1-3-2-rc3Tom 'spot' Callaway2021-05-101-24/+25
| | | | | | | | | It was noticed there was a couple SunRPC licenses were left from the work that was done in 2009-2010 (ea26246^..ba3945e). This converts them to BSD licenses. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1955239 Signed-off-by: Steve Dickson <steved@redhat.com>
* libtirpc: disallow calling auth_refresh from clnt_call with RPCSEC_GSSlibtirpc-1-3-2-rc1Scott Mayhew2021-03-151-0/+2
| | | | | | | | | Disallow calling auth_refresh from clnt_{dg,vc}_call if the client is using RPCSEC_GSS. Doing so can recurse back into clnt_{dg,vc}_call, where we'll self-deadlock waiting on the condition variable. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove AUTH_DES interfaces from auth_des.h.libtirpc-1-2-7-rc5Steve Dickson2020-12-011-15/+0
| | | | | | | | | | | | | | | The unsupported AUTH_DES authentication has be compiled out since commit d918e41d889 (Wed Oct 9 2019) replaced by API routines that return errors. To maintain a stable API and to cause future apps to fail to build, this patch removes the functions declaration from the header file. This also has the side effect of not changing the SONAME which always causes pain. Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc/types.h: fix musl buildFabrice Fontaine2019-10-071-1/+1
| | | | | | | | | | | | | From: Fabrice Fontaine <fontaine.fabrice@gmail.com> Don't redefine existing typedef (u_char, u_long, ...) on musl Fixes: - http://autobuild.buildroot.net/results/dbc07e383605a84eb19a2fd1899668612212518a Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Commit e45bf420983e fixed issue for uclibc-ng, but on uclibc thisPetr Vorel2019-06-111-2/+3
| | | | | | | | | | | | | depends on __UCLIBC_HAS_RPC__. This is old patch from Buildroot commit c54af0a294 ("libtirpc: handle the case where uClibc may have RPC support") by Thomas Petazzoni. Fixes: 6d8d4b5a7bf6 ("Include string.h for memset") Fixes: e45bf420983e ("Fix struct rpcent for uclibc-ng") Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add includes to pmap_clnt.hlibtirpc-1-0-3-rc1Thorsten Kukuk2017-11-141-0/+4
| | | | | | | | | | | When disabling the deprecated sunrpc code in glibc and build openSUSE Tumbleweed completly with libtirpc, I found some programs including rpc/pmap_clnt.h without all needed header files before. Since the list is uncommon and a surprise (sunrpc did include them in that header), I added them to the tirpc header, too: Signed-off-by: Thorsten Kukuk <kukuk@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add some typedefs to rpc/types.h to allow applications be compiled with ↵Thorsten Kukuk2017-11-141-0/+22
| | | | | | | | | | | | -std=iso9899:1990 When disabling the deprecated sunrpc code in glibc and build openSUSE Tumbleweed completly with libtirpc, I found some programs using non-standard -std= options. The following patch fixes the compile problems (Patch is taken from glibc): Signed-off-by: Thorsten Kukuk <kukuk@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix struct rpcent for uclibc-nglibtirpc-1-0-2-rc4Joshua Kinard2017-07-051-1/+1
| | | | | | | | | | | | Commit 6d8d4b5a7bf6 addresses an issue for musl, based on a description of an earlier patch at https://patchwork.kernel.org/patch/5499671/. That description notes uncertainty with uclibc, which also defines __GLIBC__. This patch fixes the uclibc case by also checking for __UCLIBC__. Fixes: 6d8d4b5a7bf6 ("Include string.h for memset") Signed-off-by: Joshua Kinard <kumba@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com> Cc: Natanael Copa <ncopa@alpinelinux.org>
* Remove des*.c dependencies to glibclibtirpc-1-0-2-rc3Thorsten Kukuk2016-04-041-1/+1
| | | | | | | | | Our des_impl.c has dependencies to glibc header files and different arguments then our header file has. Bring our own code in sync. Signed-off-by: Thorsten Kukuk <kukuk@thkukuk.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Don't declare setrpcent/endrpcent on glibc based systemsThorsten Kukuk2016-02-021-1/+2
| | | | | | | | | | | | rpc/rpcent.h declares structs and functions, which are also declared by glibc. Some of them are protected by "#if !defined(__GLIBC__)", but setrpcent/endrpcent were not. Move them into the #if statement. Else compilation of applications including netdb.h will fail, since the TIRPC declaration is slightly different from glibc. Signed-off-by: Thorsten Kukuk <kukuk@thkukuk.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Drop the xp_auth member of SVCXPRTPeter Rosin2015-10-301-1/+0
| | | | | | | | | | Internally, the xp_auth pointer is no longer needed. Nor should new authenticators rely on it in the future. No other libtirpc has this field. For better RPC application portability, remove it. Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix SVCAUTH lifetime issues and move towards SolarisPeter Rosin2015-10-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | There are lifetime problems with the current handling of SVCAUTH and the core library has no business ever destroying an SVCAUTH. These lifetime problems leads to the gss authenticator leaking a SVCAUTH when interleaved calls on the transport arrive with non-gss credential flavors. So, plagiarize the Solaris solution and keep an inlined SVCAUTH struct to make it obvious that the core library is not managing the life of SVCAUTH. Then point the old xp_auth pointer to the inlined SVCAUTH by default. This makes it possible to match the Solaris macro SVC_XP_AUTH, while still remaining compatible with any old external xp_auth pointer users. Adjust the gss authenticator to keep track of its own gss data per SVCXPRT. This is still not a good gss implementation, but it is at least better than before. Tested-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Peter Rosin <peda@lysator.liu.se> Signed-off-by: Steve Dickson <steved@redhat.com>
* Align with Solaris in the process.Peter Rosin2015-10-302-0/+51
| | | | | | | Move the SVC_VERSQUIET flag from xp_p3 into a extendable struct Signed-off-by: Peter Rosin <peda@lysator.liu.se> Signed-off-by: Steve Dickson <steved@redhat.com>
* Handle gss auth reference counting internallyBrendan Heading2015-10-301-28/+4
| | | | | | | | | | | | | | | | | The previous implementation of auth_get and auth_put used atomic builtins to allow thread-safe updating of a reference count for the AUTH object. This causes libtirpc not to build on a number of non-mainstream architectures which don't support the atomic builtins. In addition it exposed the feature as macros through a header file, rather than through the ABI, preventing the underlying implementation from being updated. This patch removes the API calls and handles the reference counting/ deallocation of the AUTH object internally. Signed-off-by: Brendan Heading <brendanheading@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Use poll() instead of select() in svc_run()Thorsten Kukuk2015-08-281-4/+2
| | | | | | | | | | | | | | | | | | | TI-RPC is using select() in svc_run(), while glibc and Solaris are using poll(). This has two drawbacks: poll() is much more efficient then select(), and with select() we are limited to 1024 open filehandles. And applications replacing svc_run on Linux don't work, since they expect svc_pollfd and svc_max_pollfd. Attached patch changes this. It's full backward compatible, API and ABI, so e.g. current rpcbind will continue to work and compile. The only problem could arrive, that we can have more than 1024 open filehandles and applications ignoring higher ones. Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Thorsten Kukuk <kukuk@thkukuk.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add sunrpc compat define for xp_sockThorsten Kukuk2015-07-101-0/+1
| | | | | | | | SunRPC is using xp_sock in SVCXPRT, while TI-RPC is using xp_fd. For compatibility reasons, we should add this define: Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add authdes_pk_createThorsten Kukuk2015-07-101-0/+2
| | | | | | | | | when porting the glibc libnsl library to TI-RPC, there were missing compat functions. This patch contains the fixes from authdes_create: Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove g_OID_equal()Chuck Lever2015-07-101-5/+0
| | | | | | | | Clean up: g_OID_equal() is not part of the RPC GSS API on FreeBSD Solaris, or in the legacy glibc API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* enable xdr_sizeofThorsten Kukuk2015-07-101-0/+1
| | | | | | | | xdr_sizeof is not enabled in TI-RPC. But this function is needed to port the glibc libnsl library to TI-RPC: Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove vestiges of AUTH_KERBChuck Lever2015-06-162-196/+0
| | | | | | | | | | | | | | | | | AUTH_KERB is described only briefly in the ONC+ Developer's Guide. However, xdr_authkerb_cred(), for example, is declared in Linux's tirpc/rpc/auth.h, but does not appear in Solaris 11's RPC headers. It is not provided by glibc, so there isn't any backward compatibility requirement. The libtirpc implementation of AUTH_KERB here on Linux and in FreeBSD seems to be incomplete and inoperative. Seems like the scattered pieces of it can be removed safely. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* Enable rtime() API for backward compatibility with glibc's SunRPCChuck Lever2015-06-161-1/+1
| | | | | | | | | | Note that TI-RPC redefines rtime() to use TI-RPC-style arguments. libtirpc on Linux has never provided rtime(), but glibc does. Since rtime() is something of a legacy anyway, just make our version of rtime() look and work like the glibc version. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* Enable key_prot API for backward compatibility with glibc's SunRPCChuck Lever2015-06-161-0/+264
| | | | | | | | The only missing file was key_prot.h. I copied the SunRPC-licenced version of key_prot.x from glibc, and generated key_prot.h using rpcgen. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* Revert commit 4ba9ce277dd6 ('configure.ac: Allow for disabling auth DES')Chuck Lever2015-06-162-12/+0
| | | | | | | | | | AUTH_DES is a part of legacy glibc SunRPC, and cannot be optional. Adding an autoconf macro (HAVE_AUTHDES) into libtirpc source files is OK, but adding such a macro into installed header files is wrong. Reported-by: Thorsten Kukuk <kukuk@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* Revert commit ddf99776a7a9 ('auth.h: Remove unsupported routine . . .')Chuck Lever2015-06-162-0/+34
| | | | | | | | These are part of glibc backward compatibility, and cannot be removed yet. Reported-by: Thorsten Kukuk <kukuk@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* Commit 7228a9482b92 missed tirpc/rpc/rpcsec_gss.h .libtirpc-0-3-1-rc1Chuck Lever2015-06-011-3/+8
| | | | | | | Fixes: 7228a9482b92 ('Avoid use of internal glibc sys/cdefs.h . . .') Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Expose legacy svcauth_gss APIsChuck Lever2015-06-011-0/+50
| | | | | | | | | | | | | | svcauth_gss_set_svc_name() and svcauth_gss_get_principal() are part of the legacy U-M API that some RPC server applications may expect to be present. The trick is leaving these out when --disable-gssapi is specified. A new public header file is created to keep GSS-API dependencies separate. Reported-by: Thorsten Kukuk <kukuk@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Do not include rpc/auth_gss.h in rpc/rpc.hChuck Lever2015-06-011-4/+0
| | | | | | | | | | | | | | | | <rpc/auth_gss.h> includes <gssapi/gssapi.h>, which isn't always available. In <rpc/rpc.h>, "#include <rpc/auth_gss.h>" is stuck behind a conditional that is true when libtirpc itself is built. But it's unlikely that RPC API consumers would ever set HAVE_RPCSEC_GSS. If they need <rpc/auth_gss.h> they include it explicitly already. Therefore, that include is not effective when the header is installed and can be removed safely. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove requirement for gssapi/gssapi.h in svc_auth.hChuck Lever2015-06-011-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When --disable-gssapi is specified and gssapi.h is not installed on the build system, making libtirpc fails: CC libtirpc_la-bindresvport.lo In file included from ../tirpc/rpc/svc_auth.h:44:0, from ../tirpc/rpc/rpc.h:68, from bindresvport.c:46: ../tirpc/rpc/rpcsec_gss.h:38:27: fatal error: gssapi/gssapi.h: No such file or directory #include <gssapi/gssapi.h> ^ compilation terminated. Commit d5259e751111 added "#include <rpc/rpcsec_gss.h>" to <rpc/svc_auth.h> . That tries to include <gssapi/gssapi.h>, which is missing in this case. Remove the fields added in SVCAUTH that require including <rpc/rpcsec_gss.h>. These are not part of the TI-RPC public API as far as I can tell. Then "#include <rpc/rpcsec_gss.h>" can be safely removed from <rpc/svc_auth.h> . Reported-by: Thorsten Kukuk <kukuk@suse.de> Fixes: d5259e751111 ('Add header definitions for rpc_gss_*() APIs') Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Revert "Fix Build w/gssapi disabled"Steve Dickson2015-06-012-11/+1
| | | | This reverts commit 7b7337b7e6541649a82b09a5c268c7fe6404fbf4.
* Fix Build w/gssapi disabledThorsten Kukuk2015-05-072-1/+11
| | | | | | | | | | | A regression was introduced by commit d5259e75 that broke the --disable-gssapi configuration flag causing numerous compile errors. This patch fixes those errors but then the config flag is used it breaks API with previous releases. Signed-off-by: Steve Dickson <steved@redhat.com>
* auth.h: Remove unsupported routine declarationsSteve Dickson2015-04-302-34/+0
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix xdr_rpc* defines in xdr.hThorsten Kukuk2015-04-291-9/+5
| | | | | | | | | The defines for xdr_rpc* in xdr.h are wrong. It could be very well that Solaris did strip the '_t' from xdr_u_int32_t, but Solaris has a xdr_u_int32 function, we don't have this. So all of this defines will lead to an unresolved symbol. Signed-off-by: Steve Dickson <steved@redhat.com>
* configure.ac: Allow for disabling auth DESBernhard Reutner-Fischer2015-04-292-0/+12
| | | | | | | DES encryption might not be available. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add header definitions for rpc_gss_*() APIsChuck Lever2015-04-292-0/+144
| | | | | | | | | | | | | This patch describes the API defined in Solaris and FreeBSD to provide RPCSEC GSS support for user space TI-RPC consumers. The header file is based on the API provided in Solaris, but was written from scratch. The man page was written by Doug Rabson for the FreeBSD implementation of this API, and updated by me where needed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Include string.h for memsetNatanael Copa2015-04-231-1/+1
| | | | | | | This fixes warning: implicit declaration of function 'memset' Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* Avoid use of internal glibc sys/cdefs.h headerNatanael Copa2015-04-2320-148/+357
| | | | | | | | | | | | This header was never intended to be used by programs. Expand the macros used, __BEGIN_CDECLS, __END_CDECLS and __P() The __THROW macro is a non-portable hint for optimization so we simply remove those. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* Pre-register server side RPCSEC GSS supportlibtirpc-0-2-5-rc2Chuck Lever2014-04-092-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | When --enable-gss is specified on the ./configure command line, have the library automatically register server-side support for the RPCSEC_GSS auth flavor. The complication is that specific interaction is required with the RPC client if GSS authentication fails. GSS authentication sometimes has to squelch the normal reply done by svc_getreq(), and substitute its own. _svcauth_gss() already has a boolean argument to do this. But _authenticate() is an official API (see rpc/svc_auth.h). We can't alter its synopsis. Instead of adding a "no_dispatch" argument to our existing _authenticate() API, preserve its synopsis for backwards compatibility, and introduce a second external authentication API for the dispatcher. This matches a similar API change done in the Solaris libtirpc. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* glibc rpcgen compatibilityChuck Lever2013-12-091-0/+2
| | | | | | | | | | | xdr_quad_t() and xdr_u_quad_t() call sites are generated by glibc's rpcgen, which uses them to marshal 64-bit integers. Since we want libtirpc to maintain glibc compatibility, introduce xdr_quad_t() and xdr_u_quad_t() to libtirpc. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add compatibility XDR functions for unsigned integersChuck Lever2013-12-091-0/+4
| | | | | | | | | | | | For compatibility with glibc and Solaris, add synonyms for the existing XDR functions that handle sized unsigned integers. Note that the NFSv4 protocol specifications define the protocol in terms of "uint32" and "uint64" rather than using the "u_int" versions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add xdr_int8_t() and xdr_u_int8_t()Chuck Lever2013-12-091-0/+2
| | | | | | | | | The legacy RPC implementation in glibc has XDR functions for 8-bit integers. For glibc compatibility, introduce similar functions in libtirpc. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove variadic macro invocationChuck Lever2013-07-011-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit f8104ba9 "Fix debugging reference from non-GSS to optional" GSS code.", Thu Apr 26 15:12:08 2012, introduces a variadic macro invocation (a GNU C extension) in the rpc/auth.h header. An attempt was made to hide the extension behind #ifdef __GNUC__ but the #else arm also uses the same synopsis, so the variadic macro is visible for non-GNU C compiles as well. With gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8) on Fedora 18, I see: /usr/include/tirpc/rpc/auth.h:255:32: warning: ISO C does not permit named variadic macros [-Wvariadic-macros] I imagine this warning is produced by the "-pedantic" gcc option, which I use in various projects that depend on libtirpc headers. Rather than further cluttering the code in auth.h, we can live without this debugging message. Cc: Nick Alcock <nick.alcock@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpcent: mark getrpcbyname name argument as const char *Thomas Petazzoni2013-02-121-1/+1
| | | | | | | | This allows to match the glibc prototype and avoid compiling error when building libtirpc against a C library that has RPC support. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpcent: remove prototypes of reentrant variantsThomas Petazzoni2013-02-121-5/+0
| | | | | | | | | The reentrant variants of getrpcbynumber() and al. are not implemented by libtirpc, so there is no point in advertising them in this header file. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add authgss_free_private_data interface.NeilBrown2013-02-121-0/+1
| | | | | | | | | | | | | | | | | | | This is a necessary partner to authgss_get_private_data, so that the caller can free the data when needed (and not before). The previous practice of leaving the private data where it was resulted in authgss_destroy_context() attempting to destroy the context on the server which was incorrect, and fortunately fails for other reasons. An application which uses authgss_get_private_data() but does not call authgss_free_private_data() will be as correct as, or slightly more correct than, it was, but will suffer a slight memory leak. This patch is based on commit 07fce317cac267509b944a8191cafa8e49b5e328 from librpcsecgss that was committed by Kevin Coffman. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix debugging-related namespace pollution.libtirpc-0-2-3-rc3Nick Alcock2012-04-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | From: Nick Alcock <nick.alcock@oracle.com> When GSS is compiled in, libtirpc exports three symbols, 'log_debug', 'log_status', and 'log_hexdump', which do nothing unless DEBUG is #defined at libtirpc compile time. This is a pretty abominable piece of namespace pollution: these symbols are quite likely to be used for local debugging routines by other binaries and shared libraries, and those local calls are now likely to go astray into libtirpc's do-nothing versions instead. So this changes the names of these functions. This is technically an ABI break, but since these symbols are undocumented and useless (with variable behaviour depending on whether DEBUG was #defined, and only present at all if GSS was compiled in) anything using those symbols was broken anyway. (A quick grep of my local sources shows numerous other local users of the name log_debug() in particular, including LVM, libassuan, GnuPG, gvfs, and dhcp. If you include binaries as well as intra-shared-library calls, the count goes much higher.) Signed-off-by: Nick Alcock <nick.alcock@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix debugging reference from non-GSS to optional GSS code.Nick Alcock2012-04-261-2/+9
| | | | | | | | | | | | | | | | | | From: Nick Alcock <nick.alcock@oracle.com> AUTH_DESTROY() and auth_destroy() are pulling in log_debug() from authgss_prot.c, but are used from outside the GSS code, thus preventing libtirpc from being used if compiled without GSS support. The (somewhat ugly) fix here defines a new macro to do the job. Because we're not compiling as C99, I use the GNU C variadic macro extension: if we mean to be compiled with other compilers, this needs to change. Signed-off-by: Nick Alcock <nick.alcock@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add multiple inclusion protection to rpc/des.hMike Frysinger2011-06-211-0/+5
| | | | | | | | If you try to include this file multiple times, you get a build failure due to redefinitions of enums and such. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* Reference count AUTHsMatthew N. Dodd2011-06-211-4/+31
| | | | | | | | | | | RPCSEC GSSv3 has the concept of a parent and a compound credential. As the normal course of operation involves using multiple AUTHs per client connection, and providing parent and compounds AUTHs when creating a GSSv3 AUTH, we need a way of reference counting them so that AUTH_DESTROY does not free them out from under a GSSv3 AUTH that is using them. Signed-off-by: Steve Dickson <steved@redhat.com>