1*89050ca1Sdholland /* $NetBSD: auth_unix.h,v 1.10 2016/01/23 02:34:09 dholland Exp $ */ 24d2cbfceScgd 3e63190e8Sderaadt /* 4e63190e8Sderaadt * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5e63190e8Sderaadt * unrestricted use provided that this legend is included on all tape 6e63190e8Sderaadt * media and as a part of the software program in whole or part. Users 7e63190e8Sderaadt * may copy or modify Sun RPC without charge, but are not authorized 8e63190e8Sderaadt * to license or distribute it to anyone else except as part of a product or 9e63190e8Sderaadt * program developed by the user. 10e63190e8Sderaadt * 11e63190e8Sderaadt * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 12e63190e8Sderaadt * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 13e63190e8Sderaadt * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 14e63190e8Sderaadt * 15e63190e8Sderaadt * Sun RPC is provided with no support and without any obligation on the 16e63190e8Sderaadt * part of Sun Microsystems, Inc. to assist in its use, correction, 17e63190e8Sderaadt * modification or enhancement. 18e63190e8Sderaadt * 19e63190e8Sderaadt * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 20e63190e8Sderaadt * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 21e63190e8Sderaadt * OR ANY PART THEREOF. 22e63190e8Sderaadt * 23e63190e8Sderaadt * In no event will Sun Microsystems, Inc. be liable for any lost revenue 24e63190e8Sderaadt * or profits or other special, indirect and consequential damages, even if 25e63190e8Sderaadt * Sun has been advised of the possibility of such damages. 26e63190e8Sderaadt * 27e63190e8Sderaadt * Sun Microsystems, Inc. 28e63190e8Sderaadt * 2550 Garcia Avenue 29e63190e8Sderaadt * Mountain View, California 94043 30e9d867efSmycroft * 31e9d867efSmycroft * from: @(#)auth_unix.h 1.8 88/02/08 SMI 324d2cbfceScgd * @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC 33e63190e8Sderaadt */ 34e63190e8Sderaadt 35e63190e8Sderaadt /* 36e63190e8Sderaadt * auth_unix.h, Protocol for UNIX style authentication parameters for RPC 37e63190e8Sderaadt * 38e63190e8Sderaadt * Copyright (C) 1984, Sun Microsystems, Inc. 39e63190e8Sderaadt */ 40e63190e8Sderaadt 41e63190e8Sderaadt /* 42e63190e8Sderaadt * The system is very weak. The client uses no encryption for it 43e63190e8Sderaadt * credentials and only sends null verifiers. The server sends backs 446dabc120Slukem * null verifiers or optionally a verifier that suggests a new short hand 45e63190e8Sderaadt * for the credentials. 46e63190e8Sderaadt */ 47e63190e8Sderaadt 483d7d6c33Sperry #ifndef _RPC_AUTH_UNIX_H_ 493d7d6c33Sperry #define _RPC_AUTH_UNIX_H_ 50e9d4dc6eSbrezak #include <sys/cdefs.h> 51e9d4dc6eSbrezak 52e63190e8Sderaadt /* The machine name is part of a credential; it may not exceed 255 bytes */ 53e63190e8Sderaadt #define MAX_MACHINE_NAME 255 54e63190e8Sderaadt 55e63190e8Sderaadt /* gids compose part of a credential; there may not be more than 16 of them */ 56e63190e8Sderaadt #define NGRPS 16 57e63190e8Sderaadt 58e63190e8Sderaadt /* 59e63190e8Sderaadt * Unix style credentials. 60e63190e8Sderaadt */ 61e63190e8Sderaadt struct authunix_parms { 6229f79e71Sdholland unsigned long aup_time; 63e63190e8Sderaadt char *aup_machname; 646dabc120Slukem int aup_uid; 656dabc120Slukem int aup_gid; 66*89050ca1Sdholland unsigned int aup_len; 676dabc120Slukem int *aup_gids; 68e63190e8Sderaadt }; 69e63190e8Sderaadt 70e9d4dc6eSbrezak __BEGIN_DECLS 7119b7469aSperry extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *); 72e9d4dc6eSbrezak __END_DECLS 73e63190e8Sderaadt 74e63190e8Sderaadt /* 75e63190e8Sderaadt * If a response verifier has flavor AUTH_SHORT, 76e63190e8Sderaadt * then the body of the response verifier encapsulates the following structure; 77e63190e8Sderaadt * again it is serialized in the obvious fashion. 78e63190e8Sderaadt */ 79e63190e8Sderaadt struct short_hand_verf { 80e63190e8Sderaadt struct opaque_auth new_cred; 81e63190e8Sderaadt }; 82e9d4dc6eSbrezak 833d7d6c33Sperry #endif /* !_RPC_AUTH_UNIX_H_ */ 84