BSD 4_4 release
[unix-history] / usr / src / usr.sbin / amd / amd / misc_rpc.c
index c3ecf30..0fb10c8 100644 (file)
@@ -1,29 +1,44 @@
 /*
 /*
- * $Id: misc_rpc.c,v 5.2 90/06/23 22:19:38 jsp Rel $
- *
  * Copyright (c) 1990 Jan-Simon Pendry
  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
  * Copyright (c) 1990 Jan-Simon Pendry
  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1990, 1993
+ *     The Regents of the University of California.  All rights reserved.
  *
  * This code is derived from software contributed to Berkeley by
  * Jan-Simon Pendry at Imperial College, London.
  *
  *
  * This code is derived from software contributed to Berkeley by
  * Jan-Simon Pendry at Imperial College, London.
  *
- * Redistribution and use in source and binary forms are permitted provided
- * that: (1) source distributions retain this entire copyright notice and
- * comment, and (2) distributions including binaries display the following
- * acknowledgement:  ``This product includes software developed by the
- * University of California, Berkeley and its contributors'' in the
- * documentation or other materials provided with the distribution and in
- * all advertising materials mentioning features or use of this software.
- * Neither the name of the University nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)misc_rpc.c  8.1 (Berkeley) 6/6/93
+ *
+ * $Id: misc_rpc.c,v 5.2.2.1 1992/02/09 15:08:40 jsp beta $
  *
  *
- *     @(#)misc_rpc.c  5.1 (Berkeley) 6/29/90
  */
 
 /*
  */
 
 /*
@@ -85,7 +100,8 @@ xdrproc_t where_xdr;
        }
 
 drop:
        }
 
 drop:
-       if (reply_msg.acpted_rply.ar_verf.oa_base) {
+       if (reply_msg.rm_reply.rp_stat == MSG_ACCEPTED &&
+                       reply_msg.acpted_rply.ar_verf.oa_base) {
                reply_xdr.x_op = XDR_FREE;
                (void)xdr_opaque_auth(&reply_xdr,
                        &reply_msg.acpted_rply.ar_verf);
                reply_xdr.x_op = XDR_FREE;
                (void)xdr_opaque_auth(&reply_xdr,
                        &reply_msg.acpted_rply.ar_verf);
@@ -142,12 +158,12 @@ AUTH *auth;
 }
 
 
 }
 
 
-#ifdef MISC_RPC
 /*
  * Early RPC seems to be missing these..
  * Extracted from the RPC 3.9 sources as indicated
  */
 
 /*
  * Early RPC seems to be missing these..
  * Extracted from the RPC 3.9 sources as indicated
  */
 
+#ifdef NEED_XDR_POINTER
 /* @(#)xdr_reference.c 1.1 87/11/04 3.9 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
 /* @(#)xdr_reference.c 1.1 87/11/04 3.9 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -218,7 +234,9 @@ xdr_pointer(xdrs,objpp,obj_size,xdr_obj)
        }
        return (xdr_reference(xdrs,objpp,obj_size,xdr_obj));
 }
        }
        return (xdr_reference(xdrs,objpp,obj_size,xdr_obj));
 }
+#endif /* NEED_XDR_POINTER */
 
 
+#ifdef NEED_CLNT_SPERRNO
 /* @(#)clnt_perror.c   1.1 87/11/04 3.9 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
 /* @(#)clnt_perror.c   1.1 87/11/04 3.9 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -311,5 +329,5 @@ clnt_sperrno(stat)
        return ("RPC: (unknown error code)");
 }
 
        return ("RPC: (unknown error code)");
 }
 
-#endif /* MISC_RPC */
+#endif /* NEED_CLNT_SPERRNO */