1261046Smav/*- 2261046Smav * Copyright (c) 2009, Sun Microsystems, Inc. 3261046Smav * All rights reserved. 48858Srgrimes * 5261046Smav * Redistribution and use in source and binary forms, with or without 6261046Smav * modification, are permitted provided that the following conditions are met: 7261046Smav * - Redistributions of source code must retain the above copyright notice, 8261046Smav * this list of conditions and the following disclaimer. 9261046Smav * - Redistributions in binary form must reproduce the above copyright notice, 10261046Smav * this list of conditions and the following disclaimer in the documentation 11261046Smav * and/or other materials provided with the distribution. 12261046Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its 13261046Smav * contributors may be used to endorse or promote products derived 14261046Smav * from this software without specific prior written permission. 158858Srgrimes * 16261046Smav * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17261046Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18261046Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19261046Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20261046Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21261046Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22261046Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23261046Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24261046Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25261046Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26261046Smav * POSSIBILITY OF SUCH DAMAGE. 278858Srgrimes * 281903Swollman * from: @(#)auth_unix.h 1.8 88/02/08 SMI 291903Swollman * from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC 3050473Speter * $FreeBSD: releng/10.2/include/rpc/auth_unix.h 261046 2014-01-22 23:45:27Z mav $ 311839Swollman */ 321839Swollman 331839Swollman/* 341839Swollman * auth_unix.h, Protocol for UNIX style authentication parameters for RPC 351839Swollman * 361839Swollman * Copyright (C) 1984, Sun Microsystems, Inc. 371839Swollman */ 381839Swollman 391839Swollman/* 401839Swollman * The system is very weak. The client uses no encryption for it 411839Swollman * credentials and only sends null verifiers. The server sends backs 421839Swollman * null verifiers or optionally a verifier that suggests a new short hand 431839Swollman * for the credentials. 441839Swollman */ 451839Swollman 461903Swollman#ifndef _RPC_AUTH_UNIX_H 471903Swollman#define _RPC_AUTH_UNIX_H 481903Swollman#include <sys/cdefs.h> 491903Swollman 501839Swollman/* The machine name is part of a credential; it may not exceed 255 bytes */ 511839Swollman#define MAX_MACHINE_NAME 255 521839Swollman 531839Swollman/* gids compose part of a credential; there may not be more than 16 of them */ 541839Swollman#define NGRPS 16 551839Swollman 561839Swollman/* 571839Swollman * Unix style credentials. 581839Swollman */ 591839Swollmanstruct authunix_parms { 601839Swollman u_long aup_time; 611839Swollman char *aup_machname; 62241181Spfg u_int aup_uid; 63241181Spfg u_int aup_gid; 641839Swollman u_int aup_len; 65241181Spfg u_int *aup_gids; 661839Swollman}; 671839Swollman 6826211Swpaul#define authsys_parms authunix_parms 6926211Swpaul 701903Swollman__BEGIN_DECLS 7193032Simpextern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *); 721903Swollman__END_DECLS 731839Swollman 748858Srgrimes/* 758858Srgrimes * If a response verifier has flavor AUTH_SHORT, 761839Swollman * then the body of the response verifier encapsulates the following structure; 771839Swollman * again it is serialized in the obvious fashion. 781839Swollman */ 791839Swollmanstruct short_hand_verf { 801839Swollman struct opaque_auth new_cred; 811839Swollman}; 821903Swollman 831903Swollman#endif /* !_RPC_AUTH_UNIX_H */ 84