[PATCH] nis/rpcsvc/yp.h: fix ypproc_first_2 declaration

Thorsten Kukuk kukuk@suse.de
Tue Mar 25 10:53:00 GMT 2003


On Tue, Mar 25, GOTO Masanori wrote:

> At Mon, 24 Mar 2003 12:30:45 -0800,
> Ulrich Drepper wrote:
> > GOTO Masanori wrote:
> > 
> > > This bug was derived from original Sun's .x code.  Solaris 8 and YP
> > > server for linux 1.3.11 are already fixed.  In addition I don't touch
> > > to fix yp.x because /usr/include/rpcsvc/yp.x in Solaris 8 is not
> > > touched...
> > 
> > References?  

> NetBSD latest cvs: 
> 
>     source /usr.sbin/ypserv/ypserv/ypserv_proc.c

NetBSD does not export this function, it is internal only.

> Solaris 8:
> 
>     /usr/include/rpcsvc/yp_prot.h:
> 
> 	 * YPPROC_FIRST (struct ypreq_nokey) returns (struct ypresp_key_val).
> 	 * Returns the first key-value pair from a named domain and map.
> 	
> 	#define YPFIRST_REQTYPE YPREQ_NOKEY
> 	#define ypfirst_req_domain yp_reqbody.yp_req_nokeytype.domain
> 	#define ypfirst_req_map yp_reqbody.yp_req_nokeytype.map

yp_prot.h is not yp.h. Did you look at glibc yp_prot.h?


> BTW, glibc nis/ypclnt.c line 408 has following code:
> 
>   result = do_ypcall (indomain, YPPROC_FIRST, (xdrproc_t) xdr_ypreq_nokey,
>                       (caddr_t) & req, (xdrproc_t) xdr_ypresp_key_val,
>                       (caddr_t) & resp);
> 
> Look at third argument.  Xargs are handled as xdr_ypreq_nokey.  This
> is the reason why we need this patch.  I've attached new patch which
> also includes fix for .x.

This defect is in the header files since the day Sun introduced YP
and it was never fixed official. We are bug compatible with the
official files from Sun in yp.[xh] and we  have a correct yp_prot.h
like Sun has, too. I see no reason to modify yp.[xh], this
will only introduce more confusion than it would help.

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20030325/1b59cc02/attachment.sig>


More information about the Libc-alpha mailing list