11de50e9fSSam Leffler /* @(#) $Header: /tcpdump/master/tcpdump/rpc_auth.h,v 1.1 2004/12/27 00:41:32 guy Exp $ (LBL) */ 21de50e9fSSam Leffler /* 31de50e9fSSam Leffler * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 41de50e9fSSam Leffler * unrestricted use provided that this legend is included on all tape 51de50e9fSSam Leffler * media and as a part of the software program in whole or part. Users 61de50e9fSSam Leffler * may copy or modify Sun RPC without charge, but are not authorized 71de50e9fSSam Leffler * to license or distribute it to anyone else except as part of a product or 81de50e9fSSam Leffler * program developed by the user. 91de50e9fSSam Leffler * 101de50e9fSSam Leffler * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 111de50e9fSSam Leffler * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 121de50e9fSSam Leffler * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 131de50e9fSSam Leffler * 141de50e9fSSam Leffler * Sun RPC is provided with no support and without any obligation on the 151de50e9fSSam Leffler * part of Sun Microsystems, Inc. to assist in its use, correction, 161de50e9fSSam Leffler * modification or enhancement. 171de50e9fSSam Leffler * 181de50e9fSSam Leffler * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 191de50e9fSSam Leffler * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 201de50e9fSSam Leffler * OR ANY PART THEREOF. 211de50e9fSSam Leffler * 221de50e9fSSam Leffler * In no event will Sun Microsystems, Inc. be liable for any lost revenue 231de50e9fSSam Leffler * or profits or other special, indirect and consequential damages, even if 241de50e9fSSam Leffler * Sun has been advised of the possibility of such damages. 251de50e9fSSam Leffler * 261de50e9fSSam Leffler * Sun Microsystems, Inc. 271de50e9fSSam Leffler * 2550 Garcia Avenue 281de50e9fSSam Leffler * Mountain View, California 94043 291de50e9fSSam Leffler * 301de50e9fSSam Leffler * from: @(#)auth.h 1.17 88/02/08 SMI 311de50e9fSSam Leffler * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC 321de50e9fSSam Leffler * $FreeBSD$ 331de50e9fSSam Leffler */ 341de50e9fSSam Leffler 351de50e9fSSam Leffler /* 361de50e9fSSam Leffler * auth.h, Authentication interface. 371de50e9fSSam Leffler * 381de50e9fSSam Leffler * Copyright (C) 1984, Sun Microsystems, Inc. 391de50e9fSSam Leffler * 401de50e9fSSam Leffler * The data structures are completely opaque to the client. The client 411de50e9fSSam Leffler * is required to pass a AUTH * to routines that create rpc 421de50e9fSSam Leffler * "sessions". 431de50e9fSSam Leffler */ 441de50e9fSSam Leffler 451de50e9fSSam Leffler #ifndef __RPC_AUTH_H_ 461de50e9fSSam Leffler #define __RPC_AUTH_H_ 471de50e9fSSam Leffler 481de50e9fSSam Leffler /* 491de50e9fSSam Leffler * Status returned from authentication check 501de50e9fSSam Leffler */ 511de50e9fSSam Leffler enum sunrpc_auth_stat { 521de50e9fSSam Leffler SUNRPC_AUTH_OK=0, 531de50e9fSSam Leffler /* 541de50e9fSSam Leffler * failed at remote end 551de50e9fSSam Leffler */ 561de50e9fSSam Leffler SUNRPC_AUTH_BADCRED=1, /* bogus credentials (seal broken) */ 571de50e9fSSam Leffler SUNRPC_AUTH_REJECTEDCRED=2, /* client should begin new session */ 581de50e9fSSam Leffler SUNRPC_AUTH_BADVERF=3, /* bogus verifier (seal broken) */ 591de50e9fSSam Leffler SUNRPC_AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ 601de50e9fSSam Leffler SUNRPC_AUTH_TOOWEAK=5, /* rejected due to security reasons */ 611de50e9fSSam Leffler /* 621de50e9fSSam Leffler * failed locally 631de50e9fSSam Leffler */ 641de50e9fSSam Leffler SUNRPC_AUTH_INVALIDRESP=6, /* bogus response verifier */ 651de50e9fSSam Leffler SUNRPC_AUTH_FAILED=7 /* some unknown reason */ 661de50e9fSSam Leffler }; 671de50e9fSSam Leffler 681de50e9fSSam Leffler /* 691de50e9fSSam Leffler * Authentication info. Opaque to client. 701de50e9fSSam Leffler */ 711de50e9fSSam Leffler struct sunrpc_opaque_auth { 721de50e9fSSam Leffler u_int32_t oa_flavor; /* flavor of auth */ 731de50e9fSSam Leffler u_int32_t oa_len; /* length of opaque body */ 741de50e9fSSam Leffler /* zero or more bytes of body */ 751de50e9fSSam Leffler }; 761de50e9fSSam Leffler 771de50e9fSSam Leffler #define SUNRPC_AUTH_NONE 0 /* no authentication */ 781de50e9fSSam Leffler #define SUNRPC_AUTH_NULL 0 /* backward compatibility */ 791de50e9fSSam Leffler #define SUNRPC_AUTH_UNIX 1 /* unix style (uid, gids) */ 801de50e9fSSam Leffler #define SUNRPC_AUTH_SYS 1 /* forward compatibility */ 811de50e9fSSam Leffler #define SUNRPC_AUTH_SHORT 2 /* short hand unix style */ 821de50e9fSSam Leffler #define SUNRPC_AUTH_DES 3 /* des style (encrypted timestamps) */ 831de50e9fSSam Leffler 841de50e9fSSam Leffler #endif /* !__RPC_AUTH_H_ */ 85