RPC svc_getcaller() problem 4.x/5.x

RPC svc_getcaller() problem 4.x/5.x

Post by Wolli Stein » Tue, 27 Dec 1994 07:37:34



Hello,
I have developed a RPC client/server package under 4.1.3.  When I was
trying to port the whole stuff to 5.3 I decided to use the compatibility
mode cause the 5.3 version does not work correctly.  The old binaries
work fine on our Solaris machine except for two things. They do not log
through syslog() so I have to write my own but I'm unable to get the
address of the client. I use the following piece of code to determine
the address:

 struct SVCXPRT* transp;
 struct sockaddr_in *sockin;

 sockin = svc_getcaller(transp);
 syslog(LOG_DEBUG,"sin_family=%d",sockin->sin_family);
 syslog(LOG_DEBUG,"sin_port=%d",sockin->sin_port);
 syslog(LOG_DEBUG,"sin_addr=%x",sockin->sin_addr.s_addr);

4.1.3: (works)
        sin_family=2
        sin_port=921
        sin_addr=7f000001

5.3: (not correct)
        sin_family=0
        sin_port=43088
        sin_addr=0

If any of you have any experience or even just hints to get this working,
please let me know. Any help is appreciated.
Cheers, Wolli

 
 
 

1. How to use rpc.portmap, rpc.mountd, rpc.nfsd?

[Q2] Stupid but non-FAQ NFS question #2:
Thanks for the help of finding out the rpc.portmap, rpc.mountd, rcp.nfsd.  
Still, after reading the NFS-FAQ, Linux Network Admin Guide, none of these guys
seem to work at all.  I still get the message of RPC fault: program is not
registered.  I guess I really need a cookbook example.

Let's say I have machines A and B which both of them can telnet and ftp to each
other.  In other words, they are properly connected.  Now, this is how I did.
I add three statements at the begninning of the rc.inet2 at machine A:

/usr/sbin/rpc.portmap
/usr/sbin/rpc.mountd
/usr/sbin/rpc.nfsd
/bin/mount -t nfs B:/home /mnt

Then, I add /mnt B[rw] at /etc/exports at machine A.
Then, reboot machine A, and it prompts RPC fault: program is not registered.
Can anyone provide me an idiot-proof way of attacking this?  Thanks.
BTW, someone mention "premeter".  What is that?

--

Salem

2. OpenBSD ports

3. Where are rpc.portmap, rpc.mountd, rpc.nfsd?

4. Q: Filtering outgoing mail

5. Dangers of rpc.portmap, rpc.mountd, rpc.nfsd

6. Microport shmcreate

7. RPC 4.0 vs RPC 4.1 vs TI RPC

8. Getting Sun to recognize DNS instead of NIS

9. Comparison bet soap rpc, dce rpc and sun rpc

10. svc_getcaller

11. svc_getcaller in Solaris 2 - does it work ?

12. Where does svc_getcaller live in Solaris 2.2 ?

13. RFI: RPC books; Also Problem with Sun Solaris 2.4 and RPC