alfred 33d91c2dd3 Fix the credential handling code.
In NetBSD, Solaris, xprt->xp_p2 pointed directly to the credentials,
in FreeBSD xprt->xp_verf.oa_base was a pointer to a struct cmessage,
which is defined as follow:

struct cmessage {
        struct cmsghdr cmsg;
        struct cmsgcred cmcred;
};

The credentials were submitted the right way and xprt->xp_p2 pointed to them.
But cb_verf.oa_flavor was still empty. There was an assignment missing
in svc_recv() in svc_vc.c:

msg->rm_call.cb_verf.oa_flavor = AUTH_UNIX;

Also

+       if (addr.ss_family == AF_LOCAL) {
+               xprt->xp_raddr = *(struct sockaddr_in *)xprt->xp_rtaddr.buf;
+               xprt->xp_addrlen = sizeof (struct sockaddr_in);
+       }

was missing. But the first seems not to be needed:

I guess in rpc.yppasswdd there was a typo:

- transp>xp_verf.oa_flavor != AUTH_UNIX) {
+ rqstp->rq_cred.oa_flavor != AUTH_UNIX) {

This little fix does fix the breakage in rpc.yppasswdd :-)

+       if (msg.msg_controllen == 0 ||
+           (msg.msg_flags & MSG_CTRUNC) != 0)
+               return (-1);

We cannot set the cb_verf.oa_length in svc_recv() of svc_vc.c,
the credentials get overwritten then, and that's bad.

Submitted by: mbr
2002-02-05 19:30:30 +00:00
..
2002-01-28 19:02:34 +00:00
2001-09-30 21:06:00 +00:00
2001-07-09 23:12:23 +00:00
2002-02-05 19:30:30 +00:00
2001-03-27 17:27:19 +00:00
2001-03-27 17:27:19 +00:00
2001-09-30 21:41:46 +00:00
2001-09-30 22:02:43 +00:00
2001-03-27 17:27:19 +00:00
2001-09-30 22:15:15 +00:00
2002-01-06 08:47:19 +00:00
2002-02-05 06:49:11 +00:00
2001-12-21 18:26:01 +00:00
2001-03-27 17:27:19 +00:00
2002-01-02 06:54:18 +00:00
2001-09-30 22:02:43 +00:00