1258578Shrs/*-
2258578Shrs * Copyright (c) 2009, Sun Microsystems, Inc.
3258578Shrs * All rights reserved.
48858Srgrimes *
5258578Shrs * Redistribution and use in source and binary forms, with or without
6258578Shrs * modification, are permitted provided that the following conditions are met:
7258578Shrs * - Redistributions of source code must retain the above copyright notice,
8258578Shrs *   this list of conditions and the following disclaimer.
9258578Shrs * - Redistributions in binary form must reproduce the above copyright notice,
10258578Shrs *   this list of conditions and the following disclaimer in the documentation
11258578Shrs *   and/or other materials provided with the distribution.
12258578Shrs * - Neither the name of Sun Microsystems, Inc. nor the names of its
13258578Shrs *   contributors may be used to endorse or promote products derived
14258578Shrs *   from this software without specific prior written permission.
158858Srgrimes *
16258578Shrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17258578Shrs * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18258578Shrs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19258578Shrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20258578Shrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21258578Shrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22258578Shrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23258578Shrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24258578Shrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25258578Shrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26258578Shrs * 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$
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