Bug 26080

Summary: [PATCH] various RPC fixes
Product: Base System Reporter: mb <mb>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   

Description mb 2001-03-25 20:10:01 UTC
rpc_lib (rpc_soc.c, clnt.h, svc.h):

- Adding compatibility functions for af_unix sockets. The new functions
are slightly different from the old ones, so it's a good thing to have
compat stups.

- Also readd CLGET_LOCAL_ADDR which is needed by the compat code.

cfs: (/usr/ports/security/cfs)

Use rpcbind calls instead of portmappers.

clnt_generic.c:

Adding a temporary fix for the af_unix rpc connections what we had
previously in our old rpc code. This makes secure rpc client programms
working again, cause they are using an authentificated unix channel.
Rpcbind has been hacked by the netbsd people directly, so they have not
seen the breakage.

The current code should normally work, but it doesn't. I've investigated a
lot of time. One thing is, that for af_unix sockets it is wrong to call
getaddrinfo() which fails.

Anyway, this fix does it's job and so we can investigate some time to
provide the real fix.

key_call.c:

This modification is needed to get client programms be able to speak
to keyserv again. For some strange reason, clnt_create seems not be able
in stock tirpc to create a af_unix connection (clnt_tp_create). You have
to use clnt_vc_create for this. Anyway, this modification made keyserv
running again.

/var/run/keyservsock is hardcoded as in previos rpc we had. This should 
be changes IMHO.

keyserv:

Fix broken keyserv and register the unix sockets properly.

mount_nfs:

Re-add the functionality I removed by misstake. We support connections to
nfsd ports, without using portmapper. This fixes the cfs port.

mountd:

Deal with cases where in /etc/netconfig there are commented out ipv6 entries
or kernels which only provide IPv4 functionality. We should always test both
cases, netconfig and ipv6 support.

Also replace pmap_unset() with rpcb_unset() which fixes the unregistering.

nfsd:

Deal with cases where in /etc/netconfig there are commented out ipv6 entries
or kernels which only provide IPv4 functionality. We should always test both
cases, netconfig and ipv6 support.

rpcdatabase:

Add cfs (crypted file system) and keycrypt (used by keyserv) to our
rpc database file.

Fix: 

There are several fixes:

http://home.teleport.ch/freebsd/mountd.c.diff
http://home.teleport.ch/freebsd/af_unix.diff
http://home.teleport.ch/freebsd/cfs.diff
http://home.teleport.ch/freebsd/clnt_generic.c.diff
http://home.teleport.ch/freebsd/key_call.c.diff
http://home.teleport.ch/freebsd/keyserv.diff
http://home.teleport.ch/freebsd/mount_nfs.c.diff
http://home.teleport.ch/freebsd/mountd.c.diff
http://home.teleport.ch/freebsd/nfsd.c.diff
http://home.teleport.ch/freebsd/rpcdatabase.diff

Testers are welcome.
Martin
Comment 1 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2001-10-07 01:43:47 UTC
State Changed
From-To: open->closed

Superseded by PRs 29171 through 29177.