141c99275SPeter Avalos /* 241c99275SPeter Avalos * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 341c99275SPeter Avalos * unrestricted use provided that this legend is included on all tape 441c99275SPeter Avalos * media and as a part of the software program in whole or part. Users 541c99275SPeter Avalos * may copy or modify Sun RPC without charge, but are not authorized 641c99275SPeter Avalos * to license or distribute it to anyone else except as part of a product or 741c99275SPeter Avalos * program developed by the user. 841c99275SPeter Avalos * 941c99275SPeter Avalos * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 1041c99275SPeter Avalos * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1141c99275SPeter Avalos * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 1241c99275SPeter Avalos * 1341c99275SPeter Avalos * Sun RPC is provided with no support and without any obligation on the 1441c99275SPeter Avalos * part of Sun Microsystems, Inc. to assist in its use, correction, 1541c99275SPeter Avalos * modification or enhancement. 1641c99275SPeter Avalos * 1741c99275SPeter Avalos * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 1841c99275SPeter Avalos * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 1941c99275SPeter Avalos * OR ANY PART THEREOF. 2041c99275SPeter Avalos * 2141c99275SPeter Avalos * In no event will Sun Microsystems, Inc. be liable for any lost revenue 2241c99275SPeter Avalos * or profits or other special, indirect and consequential damages, even if 2341c99275SPeter Avalos * Sun has been advised of the possibility of such damages. 2441c99275SPeter Avalos * 2541c99275SPeter Avalos * Sun Microsystems, Inc. 2641c99275SPeter Avalos * 2550 Garcia Avenue 2741c99275SPeter Avalos * Mountain View, California 94043 2841c99275SPeter Avalos * 2941c99275SPeter Avalos * from: @(#)auth.h 1.17 88/02/08 SMI 3041c99275SPeter Avalos * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC 3141c99275SPeter Avalos * $FreeBSD: src/include/rpc/auth.h,v 1.14.2.1 1999/08/29 14:39:02 peter Exp $ 3241c99275SPeter Avalos */ 3341c99275SPeter Avalos 3441c99275SPeter Avalos /* 3541c99275SPeter Avalos * auth.h, Authentication interface. 3641c99275SPeter Avalos * 3741c99275SPeter Avalos * Copyright (C) 1984, Sun Microsystems, Inc. 3841c99275SPeter Avalos * 3941c99275SPeter Avalos * The data structures are completely opaque to the client. The client 4041c99275SPeter Avalos * is required to pass a AUTH * to routines that create rpc 4141c99275SPeter Avalos * "sessions". 4241c99275SPeter Avalos */ 4341c99275SPeter Avalos 4441c99275SPeter Avalos /* 4541c99275SPeter Avalos * Status returned from authentication check 4641c99275SPeter Avalos */ 4741c99275SPeter Avalos enum sunrpc_auth_stat { 4841c99275SPeter Avalos SUNRPC_AUTH_OK=0, 4941c99275SPeter Avalos /* 5041c99275SPeter Avalos * failed at remote end 5141c99275SPeter Avalos */ 5241c99275SPeter Avalos SUNRPC_AUTH_BADCRED=1, /* bogus credentials (seal broken) */ 5341c99275SPeter Avalos SUNRPC_AUTH_REJECTEDCRED=2, /* client should begin new session */ 5441c99275SPeter Avalos SUNRPC_AUTH_BADVERF=3, /* bogus verifier (seal broken) */ 5541c99275SPeter Avalos SUNRPC_AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ 5641c99275SPeter Avalos SUNRPC_AUTH_TOOWEAK=5, /* rejected due to security reasons */ 5741c99275SPeter Avalos /* 5841c99275SPeter Avalos * failed locally 5941c99275SPeter Avalos */ 6041c99275SPeter Avalos SUNRPC_AUTH_INVALIDRESP=6, /* bogus response verifier */ 6141c99275SPeter Avalos SUNRPC_AUTH_FAILED=7 /* some unknown reason */ 6241c99275SPeter Avalos }; 6341c99275SPeter Avalos 6441c99275SPeter Avalos /* 6541c99275SPeter Avalos * Authentication info. Opaque to client. 6641c99275SPeter Avalos */ 6741c99275SPeter Avalos struct sunrpc_opaque_auth { 68*ed775ee7SAntonio Huete Jimenez nd_uint32_t oa_flavor; /* flavor of auth */ 69*ed775ee7SAntonio Huete Jimenez nd_uint32_t oa_len; /* length of opaque body */ 7041c99275SPeter Avalos /* zero or more bytes of body */ 7141c99275SPeter Avalos }; 72