Bug#382175: Sun RPC libraries and other stories

2008-11-18 Thread Florian Weimer
* Simon Phipps:

 On Nov 5, 2008, at 23:23, Michael Banck wrote:

 - portmap.c

 /*
 @(#)portmap.c   2.3 88/08/11 4.0 RPCSRC
 static char sccsid[] = @(#)portmap.c 1.32 87/08/06 Copyr 1984 Sun
 Micro;
 */

 This is portmap-6.0, from http://neil.brown.name/portmap/

 Is this in any way related to any Sun code, or is the string simply
 used by the author for external reference in some way?

It seems that the code was released by the Portable NFS group at Sun
in 1987:

  http://ftp.andrew.cmu.edu/pub//AUIS/src/contrib/mit/fxlib/rpc3.9/

(portmap.c is in etc.  Ah, those were the times!)

The distribution above was apparently intended for use on 4BSD.  This
might explain why it does not match a code base derived from SunOS 5.

An announcement of the release was re-posted to Usenet in a digest
with message ID [EMAIL PROTECTED].



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#382175: Sun RPC libraries and other stories

2008-11-18 Thread Florian Weimer
* Simon Phipps:

 On Nov 18, 2008, at 03:52, Ben Hutchings wrote:

 Many of the functions in portmap.c seem to correspond to
 rpcbind (usr/src/cmd/rpcbind) in OpenSolaris:

 Is it just the function prototypes that are derived, or is there
 derived source defining them too?

From our portmap.c:

| /*
|  * Stuff for the rmtcall service
|  */
| #define ARGSIZE 9000
|
| struct encap_parms {
| u_int arglen;
| char *args;
| };
|
| static bool_t
| xdr_encap_parms(XDR *xdrs, struct encap_parms *epp)
| {
|
| return (xdr_bytes(xdrs, (epp-args), (epp-arglen), ARGSIZE));
| }
|
| struct rmtcallargs {
| u_long  rmt_prog;
| u_long  rmt_vers;
| u_long  rmt_port;
| u_long  rmt_proc;
| struct encap_parms rmt_args;
| };
|
| static bool_t
| xdr_rmtcall_args(XDR *xdrs, struct rmtcallargs *cap)
| {
|
| /* does not get a port number */
| if (xdr_u_long(xdrs, (cap-rmt_prog)) 
| xdr_u_long(xdrs, (cap-rmt_vers)) 
| xdr_u_long(xdrs, (cap-rmt_proc))) {
| return (xdr_encap_parms(xdrs, (cap-rmt_args)));
| }
| return (FALSE);
| }
|
| static bool_t
| xdr_rmtcall_result(XDR *xdrs, struct rmtcallargs *cap)
| {
| if (xdr_u_long(xdrs, (cap-rmt_port)))
| return (xdr_encap_parms(xdrs, (cap-rmt_args)));
| return (FALSE);
| }
| 
| /*
|  * only worries about the struct encap_parms part of struct rmtcallargs.
|  * The arglen must already be set!!
|  */
| static bool_t
| xdr_opaque_parms(XDR *xdrs, struct rmtcallargs *cap)
| {
| 
| return (xdr_opaque(xdrs, cap-rmt_args.args, cap-rmt_args.arglen));
| }

From 
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/rpcbind/rpcb_svc_com.c:

| /*
|  * Stuff for the rmtcall service
|  */
| struct encap_parms {
|   ulong_t arglen;
|   char *args;
| };
|
| static bool_t
| xdr_encap_parms(xdrs, epp)
|   XDR *xdrs;
|   struct encap_parms *epp;
| {
|   return (xdr_bytes(xdrs, (epp-args), (uint_t *)(epp-arglen), ~0));
| }
|
|
| struct r_rmtcall_args {
|   ulong_t rmt_prog;
|   ulong_t rmt_vers;
|   ulong_t rmt_proc;
|   int rmt_localvers;  /* whether to send port # or uaddr */
|   char*rmt_uaddr;
|   struct encap_parms rmt_args;
| };
|
| /*
|  * XDR remote call arguments.  It ignores the address part.
|  * written for XDR_DECODE direction only
|  */
| static bool_t
| xdr_rmtcall_args(xdrs, cap)
|   register XDR *xdrs;
|   register struct r_rmtcall_args *cap;
| {
|   /* does not get the address or the arguments */
|   if (xdr_u_long(xdrs, (cap-rmt_prog)) 
|   xdr_u_long(xdrs, (cap-rmt_vers)) 
|   xdr_u_long(xdrs, (cap-rmt_proc))) {
|   return (xdr_encap_parms(xdrs, (cap-rmt_args)));
|   }
|   return (FALSE);
| }
|
| /*
|  * XDR remote call results along with the address.  Ignore
|  * program number, version  number and proc number.
|  * Written for XDR_ENCODE direction only.
|  */
| static bool_t
| xdr_rmtcall_result(xdrs, cap)
|   register XDR *xdrs;
|   register struct r_rmtcall_args *cap;
| {
|   bool_t result;
|
| #ifdef PORTMAP
|   if (cap-rmt_localvers == PMAPVERS) {
|   int h1, h2, h3, h4, p1, p2;
|   ulong_t port;
|
|   /* interpret the universal address for TCP/IP */
|   if (sscanf(cap-rmt_uaddr, %d.%d.%d.%d.%d.%d,
|   h1, h2, h3, h4, p1, p2) != 6)
|   return (FALSE);
|   port = ((p1  0xff)  8) + (p2  0xff);
|   result = xdr_u_long(xdrs, port);
|   } else
| #endif
|   if ((cap-rmt_localvers == RPCBVERS) ||
|   (cap-rmt_localvers == RPCBVERS4)) {
|   result = xdr_wrapstring(xdrs, (cap-rmt_uaddr));
|   } else {
|   return (FALSE);
|   }
|   if (result == TRUE)
|   return (xdr_encap_parms(xdrs, (cap-rmt_args)));
|   return (FALSE);
| }
| 
| /*
|  * only worries about the struct encap_parms part of struct r_rmtcall_args.
|  * The arglen must already be set!!
|  */
| static bool_t
| xdr_opaque_parms(xdrs, cap)
|   XDR *xdrs;
|   struct r_rmtcall_args *cap;
| {
|   return (xdr_opaque(xdrs, cap-rmt_args.args, cap-rmt_args.arglen));
| }

So there's certainly some overlap, and it's not just prototypes.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



glibc 2.7-16 MIGRATED to testing

2008-11-18 Thread Debian testing watch
FYI: The status of the glibc source package
in Debian's testing distribution has changed.

  Previous version: 2.7-15
  Current version:  2.7-16

-- 
This email is automatically generated; the Debian Release Team
[EMAIL PROTECTED] is responsible.
See http://release.debian.org/testing-watch/ for more information.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]