Back to index

glibc  2.9
auth_unix.h
Go to the documentation of this file.
00001 /* @(#)auth_unix.h   2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */
00002 /*
00003  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
00004  * unrestricted use provided that this legend is included on all tape
00005  * media and as a part of the software program in whole or part.  Users
00006  * may copy or modify Sun RPC without charge, but are not authorized
00007  * to license or distribute it to anyone else except as part of a product or
00008  * program developed by the user.
00009  *
00010  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
00011  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
00012  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
00013  *
00014  * Sun RPC is provided with no support and without any obligation on the
00015  * part of Sun Microsystems, Inc. to assist in its use, correction,
00016  * modification or enhancement.
00017  *
00018  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
00019  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
00020  * OR ANY PART THEREOF.
00021  *
00022  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
00023  * or profits or other special, indirect and consequential damages, even if
00024  * Sun has been advised of the possibility of such damages.
00025  *
00026  * Sun Microsystems, Inc.
00027  * 2550 Garcia Avenue
00028  * Mountain View, California  94043
00029  */
00030 /*      @(#)auth_unix.h 1.5 86/07/16 SMI      */
00031 
00032 /*
00033  * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
00034  *
00035  * Copyright (C) 1984, Sun Microsystems, Inc.
00036  */
00037 
00038 /*
00039  * The system is very weak.  The client uses no encryption for  it
00040  * credentials and only sends null verifiers.  The server sends backs
00041  * null verifiers or optionally a verifier that suggests a new short hand
00042  * for the credentials.
00043  */
00044 
00045 #ifndef _RPC_AUTH_UNIX_H
00046 #define _RPC_AUTH_UNIX_H    1
00047 
00048 #include <features.h>
00049 #include <sys/types.h>
00050 #include <rpc/types.h>
00051 #include <rpc/auth.h>
00052 #include <rpc/xdr.h>
00053 
00054 __BEGIN_DECLS
00055 
00056 /* The machine name is part of a credential; it may not exceed 255 bytes */
00057 #define MAX_MACHINE_NAME 255
00058 
00059 /* gids compose part of a credential; there may not be more than 16 of them */
00060 #define NGRPS 16
00061 
00062 /*
00063  * Unix style credentials.
00064  */
00065 struct authunix_parms
00066   {
00067     u_long aup_time;
00068     char *aup_machname;
00069     __uid_t aup_uid;
00070     __gid_t aup_gid;
00071     u_int aup_len;
00072     __gid_t *aup_gids;
00073   };
00074 
00075 extern bool_t xdr_authunix_parms (XDR *__xdrs, struct authunix_parms *__p)
00076      __THROW;
00077 
00078 /*
00079  * If a response verifier has flavor AUTH_SHORT,
00080  * then the body of the response verifier encapsulates the following structure;
00081  * again it is serialized in the obvious fashion.
00082  */
00083 struct short_hand_verf
00084   {
00085     struct opaque_auth new_cred;
00086   };
00087 
00088 __END_DECLS
00089 
00090 #endif /* rpc/auth_unix.h */