]> granicus.if.org Git - libtirpc/log
libtirpc
16 years agoMerge branch 'master' of git://git.infradead.org/~steved/libtirpc
Steve Dickson [Mon, 17 Nov 2008 17:26:22 +0000 (12:26 -0500)]
Merge branch 'master' of git://git.infradead.org/~steved/libtirpc

16 years agoFixed a warings the IPV6 client routines
Ian Kent [Tue, 28 Oct 2008 15:19:07 +0000 (11:19 -0400)]
Fixed a warings the IPV6 client routines

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years ago__rpc_taddr2uaddr_af() assumes the netbuf to always have a
Steve Dickson [Mon, 27 Oct 2008 16:46:54 +0000 (12:46 -0400)]
__rpc_taddr2uaddr_af() assumes the netbuf to always have a
non-zero data. This is a bad assumption and can lead to a
seg-fault. This patch adds a check for zero length and returns
NULL when found.

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoFix __rpc_getconfip
Olaf Kirch [Tue, 30 Sep 2008 19:10:43 +0000 (15:10 -0400)]
Fix __rpc_getconfip

__rpc_getconfip is supposed to return the first netconf
entry supporting tcp or udp, respectively. The code will
currently return the *last* entry, plus it will leak
memory when there is more than one such entry.

This patch fixes this issue.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoFix getpeereid
Olaf Kirch [Tue, 30 Sep 2008 19:09:06 +0000 (15:09 -0400)]
Fix getpeereid

getpeereid fails because it uses an incorrect getsockopt call to obtain
the peer credentials on a AF_LOCAL socket.  This in turn will cause all
RPC services to be registered with rpcbind to show up as having been
registered by "unknown".

This has a serious impact on security - a service owned by "unknown"
can essentially be unregistered (and thus replaced) by anyone.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agosvc_getcaller_netbuf macro seems broken
Olaf Kirch [Tue, 30 Sep 2008 19:08:07 +0000 (15:08 -0400)]
svc_getcaller_netbuf macro seems broken

I haven't found any documentation, but the comment in the header
file seems to suggest that svc_getcaller_netbuf should return the
xp_rtaddr netbuf. Returning the address of the socket descripor
seems to be wrong at any rate.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoIntroduce __rpc_set_netbuf helper
Olaf Kirch [Tue, 30 Sep 2008 19:06:54 +0000 (15:06 -0400)]
Introduce __rpc_set_netbuf helper

The RPC code contains a number of places where a netbuf
is initialized with some data. All the mem_alloc/memcpy
stuff is open-coded. Introduce a helper function and
convert the code.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoKill map_ipv4_to_ipv6
Olaf Kirch [Tue, 30 Sep 2008 19:05:20 +0000 (15:05 -0400)]
Kill map_ipv4_to_ipv6

After the change to svc_vc.c performed in the previous patch,
this function is no longer needed.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoFix xp_raddr handling in svc_fd_create etc
Olaf Kirch [Tue, 30 Sep 2008 19:04:17 +0000 (15:04 -0400)]
Fix xp_raddr handling in svc_fd_create etc

Currently svc_fd_create tries to do some clever tricks
with IPv4/v6 address mapping.

This is broken for several reasons.
 1. We don't want IPv4 based transport to look like IPv6
  transports. Old applications compiled against tirpc
will expect AF_INET addresses, and are not equipped
to deal with AF_INET6.
 2. There's a buffer overflow.
memcpy(&sin6, &ss, sizeof(ss));
copies a full struct sockaddr to a sockaddr_in6 on
the stack. Unlikely to be exploitable, but I wonder
if this ever worked....

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years ago- Fixed version-info in src/Makefile.am to reflect the correct version
Steve Dickson [Tue, 16 Sep 2008 15:32:31 +0000 (11:32 -0400)]
- Fixed version-info in src/Makefile.am to reflect the correct version
- Fixed some of warnings in: src/auth_time.c, src/clnt_dg.c and
    src/clnt_raw.c
- Added some #ifdef NOTUSED around some code in src/rpbc_clnt.c
  that was not being used...

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoFix for taddr2addr conversion bug of local addresses
Olaf Kirch [Tue, 16 Sep 2008 12:46:29 +0000 (08:46 -0400)]
Fix for taddr2addr conversion bug of local addresses

When converting af_local socket addresses in taddr2uaddr, an incorrect
sizeof() would result in a truncated path string. As a result,
rpcbind will report the local /var/lib/rpcbind address to clients
as "/v" on a 32bit machine.

Signed-off-by: okir@suse.de
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoAlways make IPv6 sockets V6ONLY
Olaf Kirch [Tue, 2 Sep 2008 16:11:15 +0000 (12:11 -0400)]
Always make IPv6 sockets V6ONLY

Assume you have a netconfig file looking like this:

udp        tpi_clts      v     inet     udp     -       -
udp6       tpi_clts      v     inet6    udp     -       -
...

a call to svc_tli_create(... &someaddr, "udp") will fail to create an
IPv6 server socket. The problem is that on Linux, passive IPv6 sockets
will also accept packets/connections from IPv4, and will simply map
the sender's address to an IPv6 mapped IPv4 address. So if you want to
bind both a UDPv4 and UDPv6 socket to the same port, this will fail with
EADDRINUSE.

The way to avoid this behavior is to change the socket to V6ONLY,
which tells the kernel to avoid the autmatic mapping.

The change proposed in the patch below does this. I *think* this is
a good place to do this, as it will also fix applications that do not
use svc_tli_create() - such as rpcbind, which creates the sockets on
its own using __rpc_nconf2fd.

I think this also improves portability, as BSD code assumes BSD
behavior, where this mapping does not occur either.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoFix incorrect sizeof() in __rpc_getbroadifs
Olaf Kirch [Tue, 2 Sep 2008 16:09:39 +0000 (12:09 -0400)]
Fix incorrect sizeof() in __rpc_getbroadifs

__rpc_getbroadifs returns bad broadcast addresses on 32bit
machines because when copying the broadcast addresses, ite
applies the sizeof() operator to a pointer to a sockaddr,
rather than the sockaddr itself.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoRelease 0.1.9
Steve Dickson [Wed, 9 Jul 2008 18:13:20 +0000 (14:13 -0400)]
Release 0.1.9

Signed-off-by: Steve Dickson <steved@dickson.boston.devel.redhat.com>
16 years agoUpdated COPYING with new license agreement.
Aurelien Charbon [Wed, 9 Jul 2008 18:07:11 +0000 (14:07 -0400)]
Updated COPYING with new license agreement.

Signed-off-by: Steve Dickson <steved@dickson.boston.devel.redhat.com>
16 years agoAdded super-H(sh3,sh4) architecture support
CHIKAMA Masaki [Fri, 27 Jun 2008 18:08:55 +0000 (14:08 -0400)]
Added super-H(sh3,sh4) architecture support

Signed-off-by: CHIKAMA Masaki <masaki.chikama@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoUse $(DESTDIR) in the installation of /etc/netconfig
Steve Dickson [Tue, 10 Jun 2008 19:41:22 +0000 (15:41 -0400)]
Use $(DESTDIR) in the installation of /etc/netconfig
Set the -version-info in the LDFLAGS

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoFixed infinite loop in svc_run()
Steve Dickson [Tue, 10 Jun 2008 17:35:52 +0000 (13:35 -0400)]
Fixed infinite loop in svc_run()

Signed-off-by: Steve Dickson <steved@dickson.boston.devel.redhat.com>
16 years agoAdded in svc_auth_none needed by the GSSAPI code.
Steve Dickson [Tue, 10 Jun 2008 17:22:03 +0000 (13:22 -0400)]
Added in svc_auth_none needed by the GSSAPI code.

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoRelease 0.1.8 libtirpc-0_1_8
Steve Dickson [Mon, 14 Apr 2008 19:14:16 +0000 (15:14 -0400)]
Release 0.1.8

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoInstall man pages in the 3t section
Steve Dickson [Mon, 14 Apr 2008 17:59:10 +0000 (13:59 -0400)]
Install man pages in the 3t section

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoFixed typo in libtirpc.pc.in
Steve Dickson [Mon, 18 Feb 2008 22:50:48 +0000 (17:50 -0500)]
Fixed typo in libtirpc.pc.in

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoAdded that libtirpc.pc.in that will create
Steve Dickson [Mon, 18 Feb 2008 22:30:46 +0000 (17:30 -0500)]
Added that libtirpc.pc.in that will create
the /usr/lib/pkgconfig/libtirpc.pc file that is
used by the pkg-config(1) command

Signed-off-by: Steve Dickson <steved@redhat.com>
16 years agoProtect from buffer overflow in the GSS code.
Steve Dickson [Thu, 24 Jan 2008 20:01:22 +0000 (15:01 -0500)]
Protect from buffer overflow in the GSS code.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoWhen the configuration --enable-gss used, the libgssglue
Steve Dickson [Thu, 25 Oct 2007 17:38:31 +0000 (13:38 -0400)]
When the configuration --enable-gss used, the libgssglue
library will be used instead of the libgssapi.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoCleaned out all the stale autoconf files
Steve Dickson [Thu, 25 Oct 2007 15:09:46 +0000 (11:09 -0400)]
Cleaned out all the stale autoconf files
Added autogen.sh script used to generate all
the autoconf files.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoAdded " || defined(__arm__)" to xdr_float.c which allows libtirpc
Steve Dickson [Thu, 25 Oct 2007 14:55:57 +0000 (10:55 -0400)]
Added " || defined(__arm__)" to xdr_float.c which allows libtirpc
to build on ARM processors.

Author-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
17 years ago- Change the order of network ids in /etc/netconfg
Steve Dickson [Mon, 30 Jul 2007 11:28:27 +0000 (07:28 -0400)]
- Change the order of network ids in /etc/netconfg
  putting ipv4 ids before ipv6.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years ago- Make sure remote address (xp_rtaddr) is populated
Steve Dickson [Mon, 30 Jul 2007 11:26:45 +0000 (07:26 -0400)]
- Make sure remote address (xp_rtaddr) is populated
  with the correct type of address.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoAdded IP_RECVERR processing with to clnt_dg_call() so
Steve Dickson [Fri, 4 May 2007 18:26:56 +0000 (14:26 -0400)]
Added IP_RECVERR processing with to clnt_dg_call() so
application will see errors instead of timing out

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoA couple ntohs() were needed in bindresvport_sa()
Steve Dickson [Fri, 4 May 2007 16:19:27 +0000 (12:19 -0400)]
A couple ntohs() were needed in bindresvport_sa()

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoIgnore the return value of snprintf() and use strlen() instead
Steve Dickson [Fri, 4 May 2007 15:27:43 +0000 (11:27 -0400)]
Ignore the return value of snprintf() and use strlen() instead
to bump the pointer in clnt_sperror()

Also removed calls to assert(), not needed.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoFixed mutex locking problem in clnt_raw.c. One should grab the
Steve Dickson [Fri, 4 May 2007 13:27:00 +0000 (09:27 -0400)]
Fixed mutex locking problem in clnt_raw.c. One should grab the
clntraw_lock before accessing at clntraw_private, not after.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoAdded a optimization to bindresvport that allows more
Steve Dickson [Thu, 26 Apr 2007 21:20:21 +0000 (17:20 -0400)]
Added a optimization to bindresvport that allows more
ports to be tried.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoCheck for buffer overflow in xdr_string.
Steve Dickson [Thu, 26 Apr 2007 18:42:16 +0000 (14:42 -0400)]
Check for buffer overflow in xdr_string.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoAdded SVCAUTH_DESTROY and svcauth_destroy macros to
Steve Dickson [Fri, 20 Apr 2007 19:04:22 +0000 (15:04 -0400)]
Added SVCAUTH_DESTROY and svcauth_destroy macros to
fix undefined errors

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoAdded compile define for ppc64 archs
Steve Dickson [Fri, 20 Apr 2007 19:03:11 +0000 (15:03 -0400)]
Added compile define for ppc64 archs

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoAdded in svc_auth_none needed by the GSSAPI code.
Steve Dickson [Fri, 20 Apr 2007 18:59:38 +0000 (14:59 -0400)]
Added in svc_auth_none needed by the GSSAPI code.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoAdded configure.in hooks to used the libgssapi library.
Steve Dickson [Fri, 20 Apr 2007 18:58:54 +0000 (14:58 -0400)]
Added configure.in hooks to used the libgssapi library.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoUncommented tcp6 and udp6 in the default /etc/netconfig file.
Steve Dickson [Fri, 20 Apr 2007 18:57:00 +0000 (14:57 -0400)]
Uncommented tcp6 and udp6 in the default /etc/netconfig file.

Signed-off-by: Steve Dickson <steved@redhat.com>
17 years agoInitial commit of libtirpc 0.1.7
Steve Dickson [Fri, 20 Apr 2007 18:56:09 +0000 (14:56 -0400)]
Initial commit of libtirpc 0.1.7

Signed-off-by: Steve Dickson <steved@redhat.com>