]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r239963:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 22 Sep 2012 04:18:42 +0000 (04:18 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 22 Sep 2012 04:18:42 +0000 (04:18 +0000)
commite985b3f216c54c7446799ccf6c1ed91f88921e0b
treeca9b9d5570ea36955e8dee1ba63c7e822afb6eb8
parentbf2b1097d6968c2a194982a396d509990207ee8c
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/9@240799 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