freebsd-nq/lib/libc
Alfred Perlstein 08760d5a57 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
..
alpha Add getcontext, setcontext, makecontext, and swapcontext. These 2002-01-10 02:40:59 +00:00
amd64 Fixed unsorting and splitting of SRCS in previous commit. 2002-01-11 17:10:35 +00:00
compat-43 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
db mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
gen Allow ldd(1) be used on shared libraries in addition to executables. 2002-02-04 10:33:48 +00:00
gmon * Remove __P and convert to ANSI prototypes. 2002-02-01 01:39:09 +00:00
i386 Fixed unsorting and splitting of SRCS in previous commit. 2002-01-11 17:10:35 +00:00
ia64 Implement fpsetmask() and fpgetmask(). 2001-11-03 15:52:18 +00:00
include Fixed namespace pollution related to `err' in libc in the same way as for 2001-11-11 02:48:09 +00:00
locale Do not try to convert to char already converted C monetary locale members. 2002-01-28 08:26:38 +00:00
mips
mipseb Fix all the mipseb Makefiles. They were broken when I checked them in 1999-04-22 07:16:11 +00:00
mipsel Fix all the mipseb Makefiles. They were broken when I checked them in 1999-04-22 07:16:11 +00:00
net Return ENONAME if getaddrinfo() is called with AI_NUMERICHOST 2002-02-01 08:35:16 +00:00
nls mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
posix1e Correct function's description. 2002-01-29 12:18:45 +00:00
quad $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
regex Fix a typo I made in revision 1.5. 2002-01-22 12:38:43 +00:00
rpc Fix the credential handling code. 2002-02-05 19:30:30 +00:00
sparc64 Connect user trap code to the build. 2002-01-01 21:59:53 +00:00
stdio mdoc(7) police: 2002-01-09 14:01:22 +00:00
stdlib Minor typo fix: uquad_t -> u_quad_t. 2002-01-20 16:50:29 +00:00
stdtime * style(9)'fy 2002-01-24 15:07:44 +00:00
string Revert last commit. stdio.h include is for perror(), not strerror() 2002-01-31 13:32:14 +00:00
sys Change brk's prototype from char *brk(const char *) to int brk(const void *) 2002-01-24 12:11:31 +00:00
xdr Fixed various type errors in synopsis. 2001-10-03 16:53:59 +00:00
yp Fix some 32/64-bit bugs. IPv4 addresses are 32-bits, not longs. On the 2002-01-08 18:05:03 +00:00
Makefile Rip out the old __stdin/out/err stuff. It was completely 100% useless. :-( 2001-08-13 21:48:44 +00:00
Makefile.inc Activate build of posix1e extensions in libc and libc_r that have been 2001-04-04 18:17:28 +00:00