1*45074Smckusick /* @(#)authunix_prot.c 2.1 88/07/29 4.0 RPCSRC */
2*45074Smckusick /*
3*45074Smckusick * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
4*45074Smckusick * unrestricted use provided that this legend is included on all tape
5*45074Smckusick * media and as a part of the software program in whole or part. Users
6*45074Smckusick * may copy or modify Sun RPC without charge, but are not authorized
7*45074Smckusick * to license or distribute it to anyone else except as part of a product or
8*45074Smckusick * program developed by the user.
9*45074Smckusick *
10*45074Smckusick * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
11*45074Smckusick * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
12*45074Smckusick * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
13*45074Smckusick *
14*45074Smckusick * Sun RPC is provided with no support and without any obligation on the
15*45074Smckusick * part of Sun Microsystems, Inc. to assist in its use, correction,
16*45074Smckusick * modification or enhancement.
17*45074Smckusick *
18*45074Smckusick * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
19*45074Smckusick * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
20*45074Smckusick * OR ANY PART THEREOF.
21*45074Smckusick *
22*45074Smckusick * In no event will Sun Microsystems, Inc. be liable for any lost revenue
23*45074Smckusick * or profits or other special, indirect and consequential damages, even if
24*45074Smckusick * Sun has been advised of the possibility of such damages.
25*45074Smckusick *
26*45074Smckusick * Sun Microsystems, Inc.
27*45074Smckusick * 2550 Garcia Avenue
28*45074Smckusick * Mountain View, California 94043
29*45074Smckusick */
30*45074Smckusick #if !defined(lint) && defined(SCCSIDS)
31*45074Smckusick static char sccsid[] = "@(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro";
32*45074Smckusick #endif
33*45074Smckusick
34*45074Smckusick /*
35*45074Smckusick * authunix_prot.c
36*45074Smckusick * XDR for UNIX style authentication parameters for RPC
37*45074Smckusick *
38*45074Smckusick * Copyright (C) 1984, Sun Microsystems, Inc.
39*45074Smckusick */
40*45074Smckusick
41*45074Smckusick
42*45074Smckusick #include <rpc/types.h>
43*45074Smckusick #include <rpc/xdr.h>
44*45074Smckusick #include <rpc/auth.h>
45*45074Smckusick #include <rpc/auth_unix.h>
46*45074Smckusick
47*45074Smckusick /*
48*45074Smckusick * XDR for unix authentication parameters.
49*45074Smckusick */
50*45074Smckusick bool_t
xdr_authunix_parms(xdrs,p)51*45074Smckusick xdr_authunix_parms(xdrs, p)
52*45074Smckusick register XDR *xdrs;
53*45074Smckusick register struct authunix_parms *p;
54*45074Smckusick {
55*45074Smckusick
56*45074Smckusick if (xdr_u_long(xdrs, &(p->aup_time))
57*45074Smckusick && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
58*45074Smckusick && xdr_int(xdrs, &(p->aup_uid))
59*45074Smckusick && xdr_int(xdrs, &(p->aup_gid))
60*45074Smckusick && xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
61*45074Smckusick &(p->aup_len), NGRPS, sizeof(int), xdr_int) ) {
62*45074Smckusick return (TRUE);
63*45074Smckusick }
64*45074Smckusick return (FALSE);
65*45074Smckusick }
66*45074Smckusick
67