1 /* $OpenBSD: auth_unix.h,v 1.5 2010/09/01 14:43:34 millert Exp $ */ 2 /* $NetBSD: auth_unix.h,v 1.4 1994/10/26 00:56:56 cgd Exp $ */ 3 4 /* 5 * Copyright (c) 2010, Oracle America, Inc. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are 9 * met: 10 * 11 * * Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * * Redistributions in binary form must reproduce the above 14 * copyright notice, this list of conditions and the following 15 * disclaimer in the documentation and/or other materials 16 * provided with the distribution. 17 * * Neither the name of the "Oracle America, Inc." nor the names of its 18 * contributors may be used to endorse or promote products derived 19 * from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 28 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * 34 * from: @(#)auth_unix.h 1.8 88/02/08 SMI 35 * @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC 36 */ 37 38 /* 39 * auth_unix.h, Protocol for UNIX style authentication parameters for RPC 40 */ 41 42 /* 43 * The system is very weak. The client uses no encryption for it 44 * credentials and only sends null verifiers. The server sends backs 45 * null verifiers or optionally a verifier that suggests a new short hand 46 * for the credentials. 47 */ 48 49 #ifndef _RPC_AUTH_UNIX_H 50 #define _RPC_AUTH_UNIX_H 51 #include <sys/cdefs.h> 52 53 /* The machine name is part of a credential; it may not exceed 255 bytes */ 54 #define MAX_MACHINE_NAME 255 55 56 /* gids compose part of a credential; there may not be more than 16 of them */ 57 #define NGRPS 16 58 59 /* 60 * Unix style credentials. 61 */ 62 struct authunix_parms { 63 unsigned long aup_time; 64 char *aup_machname; 65 int aup_uid; 66 int aup_gid; 67 unsigned int aup_len; 68 int *aup_gids; 69 }; 70 71 __BEGIN_DECLS 72 extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *); 73 __END_DECLS 74 75 /* 76 * If a response verifier has flavor AUTH_SHORT, 77 * then the body of the response verifier encapsulates the following structure; 78 * again it is serialized in the obvious fashion. 79 */ 80 struct short_hand_verf { 81 struct opaque_auth new_cred; 82 }; 83 84 #endif /* !_RPC_AUTH_UNIX_H */ 85