]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r239963:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 22 Sep 2012 04:22:17 +0000 (04:22 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 22 Sep 2012 04:22:17 +0000 (04:22 +0000)
commitfba9d4c1c9fa8e5a5fa0c60ef94f03f9fae93260
tree8fecd83a7de072b044718e6766457a9ab83ecbc1
parent9916eab087cd6b2efedd8e69ee855fa4950796dc
MFC r239963:

Bring some changes from Bull's NFSv4 libtirpc implementation.

____

Fixed infinite loop in svc_run()
____

__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.
____

Changed clnt_spcreateerror() to return clearer
and more concise error messages.
____

Converted all uid and gid variables of the type uid_t and gid_t.
____

libtirpc: set r_netid and r_owner in __rpcb_findaddr_timed

These fields in the rpcbind GETADDR call are being passed uninitialized
to CLNT_CALL. In the case of x86_64 at least, this usually leads to a
segfault. On x86, it sometimes causes segfaults and other times causes
garbage to be sent on the wire.

rpcbind generally ignores the r_owner field for calls that come in over
the wire, so it really doesn't matter what we send in that slot. We just
need to send something. The reference implementation from Sun seems to
send a blank string. Have ours follow suit.
____

libtirpc: be sure to free cl_netid and cl_tp

When creating a client with clnt_tli_create, it uses strdup to copy
strings for these fields if nconf is passed in. clnt_dg_destroy frees
these strings already. Make sure clnt_vc_destroy frees them in the same
way.

____

Obtained from: Bull GNU/Linux NFSv4 Project

git-svn-id: svn://svn.freebsd.org/base/stable/8@240800 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
14 files changed:
include/rpc/auth.h
include/rpc/auth_unix.h
lib/libc/rpc/auth_unix.c
lib/libc/rpc/authunix_prot.c
lib/libc/rpc/clnt_perror.c
lib/libc/rpc/clnt_vc.c
lib/libc/rpc/rpc_generic.c
lib/libc/rpc/rpc_soc.3
lib/libc/rpc/rpcb_clnt.c
lib/libc/rpc/svc_auth_unix.c
lib/libc/rpc/svc_run.c
sys/rpc/auth.h
sys/rpc/clnt_vc.c
sys/rpc/rpcb_clnt.c