| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently per-fd locks for the clients are pre-allocated up to
the soft limit of maximum allowed open file desciptors per process as
defined in __rpc_dtbsize():
if (getrlimit(RLIMIT_NOFILE, &rl) == 0) {
return (tbsize = (int)rl.rlim_cur);
}
This limit can be arbitrarily large for any given process resulting in
unreasonable memory allocation. For example, for systemd PID1 process
this limit is set to 1073741816 since version 240. systemd is an
indirect user of this library as it fetches information about users,
groups, etc...
This patch proposes a list implementation of per-fd locks based on glibc
doubly linked lists. It also includes support for a fixed array based
pre-allocation up to a compile-time defined limit of locks for
equivalence to the previous implementation.
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
-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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
This reverts commit 7b7337b7e6541649a82b09a5c268c7fe6404fbf4.
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes http://sourceforge.net/p/libtirpc/bugs/34/
The netconfig header attempts to include features.h which is only
available in glibc.
This is necessary for backporting the package for FreeBSD.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
This fixes warning: implicit declaration of function 'memset'
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean up: replace the naked "-1" with a symbolic constant that helps
document what is going on. The name matches the name of the other
pthread initializer constants.
Also, since pthread_key_t is an unsigned integer, use a type cast to
eliminate the implicit cast that occurs every time foo_key is
compared to -1. This eliminates a number of compiler warnings.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
No libtirpc source files include this header, so remove it.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
No libtirpc source files include this header, so remove it.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
No libtirpc source files include this header, so remove it.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
No libtirpc source file includes this header, so remove it.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
No libtirpc source files include this header, so remove it.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
The contents of this header are unneeded on Linux, so remove the header.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
This header is empty, so remove it.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|