auth_unix.h revision 241181
11839Swollman/*
21839Swollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
31839Swollman * unrestricted use provided that this legend is included on all tape
41839Swollman * media and as a part of the software program in whole or part.  Users
51839Swollman * may copy or modify Sun RPC without charge, but are not authorized
61839Swollman * to license or distribute it to anyone else except as part of a product or
71839Swollman * program developed by the user.
88858Srgrimes *
91839Swollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
1013771Smpp * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
111839Swollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
128858Srgrimes *
131839Swollman * Sun RPC is provided with no support and without any obligation on the
141839Swollman * part of Sun Microsystems, Inc. to assist in its use, correction,
151839Swollman * modification or enhancement.
168858Srgrimes *
171839Swollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
181839Swollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
191839Swollman * OR ANY PART THEREOF.
208858Srgrimes *
211839Swollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue
221839Swollman * or profits or other special, indirect and consequential damages, even if
231839Swollman * Sun has been advised of the possibility of such damages.
248858Srgrimes *
251839Swollman * Sun Microsystems, Inc.
261839Swollman * 2550 Garcia Avenue
271839Swollman * Mountain View, California  94043
281903Swollman *
291903Swollman *	from: @(#)auth_unix.h 1.8 88/02/08 SMI
301903Swollman *	from: @(#)auth_unix.h	2.2 88/07/29 4.0 RPCSRC
3150473Speter * $FreeBSD: head/include/rpc/auth_unix.h 241181 2012-10-04 04:15:18Z pfg $
321839Swollman */
331839Swollman
341839Swollman/*
351839Swollman * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
361839Swollman *
371839Swollman * Copyright (C) 1984, Sun Microsystems, Inc.
381839Swollman */
391839Swollman
401839Swollman/*
411839Swollman * The system is very weak.  The client uses no encryption for  it
421839Swollman * credentials and only sends null verifiers.  The server sends backs
431839Swollman * null verifiers or optionally a verifier that suggests a new short hand
441839Swollman * for the credentials.
451839Swollman */
461839Swollman
471903Swollman#ifndef _RPC_AUTH_UNIX_H
481903Swollman#define _RPC_AUTH_UNIX_H
491903Swollman#include <sys/cdefs.h>
501903Swollman
511839Swollman/* The machine name is part of a credential; it may not exceed 255 bytes */
521839Swollman#define MAX_MACHINE_NAME 255
531839Swollman
541839Swollman/* gids compose part of a credential; there may not be more than 16 of them */
551839Swollman#define NGRPS 16
561839Swollman
571839Swollman/*
581839Swollman * Unix style credentials.
591839Swollman */
601839Swollmanstruct authunix_parms {
611839Swollman	u_long	 aup_time;
621839Swollman	char	*aup_machname;
63241181Spfg	u_int	 aup_uid;
64241181Spfg	u_int	 aup_gid;
651839Swollman	u_int	 aup_len;
66241181Spfg	u_int	*aup_gids;
671839Swollman};
681839Swollman
6926211Swpaul#define authsys_parms authunix_parms
7026211Swpaul
711903Swollman__BEGIN_DECLS
7293032Simpextern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
731903Swollman__END_DECLS
741839Swollman
758858Srgrimes/*
768858Srgrimes * If a response verifier has flavor AUTH_SHORT,
771839Swollman * then the body of the response verifier encapsulates the following structure;
781839Swollman * again it is serialized in the obvious fashion.
791839Swollman */
801839Swollmanstruct short_hand_verf {
811839Swollman	struct opaque_auth new_cred;
821839Swollman};
831903Swollman
841903Swollman#endif /* !_RPC_AUTH_UNIX_H */
85