Path: blob/main/crypto/krb5/src/lib/rpc/svc_auth_none.c
39536 views
/* lib/rpc/svc_auth_none.c */1/*2Copyright (c) 2000 The Regents of the University of Michigan.3All rights reserved.45Copyright (c) 2000 Dug Song <[email protected]>.6All rights reserved, all wrongs reversed.78Redistribution and use in source and binary forms, with or without9modification, are permitted provided that the following conditions10are met:11121. Redistributions of source code must retain the above copyright13notice, this list of conditions and the following disclaimer.142. Redistributions in binary form must reproduce the above copyright15notice, this list of conditions and the following disclaimer in the16documentation and/or other materials provided with the distribution.173. Neither the name of the University nor the names of its18contributors may be used to endorse or promote products derived19from this software without specific prior written permission.2021THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED22WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF23MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE24DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE25FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR26CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF27SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR28BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF29LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING30NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS31SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3233Id: svc_auth_none.c,v 1.1 2000/08/24 20:51:34 dugsong Exp34*/3536#include <gssrpc/rpc.h>3738static bool_t svcauth_none_destroy(SVCAUTH *);39static bool_t svcauth_none_wrap(SVCAUTH *, XDR *, xdrproc_t,40caddr_t);4142struct svc_auth_ops svc_auth_none_ops = {43svcauth_none_wrap,44svcauth_none_wrap,45svcauth_none_destroy46};4748SVCAUTH svc_auth_none = {49&svc_auth_none_ops,50NULL,51};5253static bool_t54svcauth_none_destroy(SVCAUTH *auth)55{56return (TRUE);57}5859static bool_t60svcauth_none_wrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func,61caddr_t xdr_ptr)62{63return ((*xdr_func)(xdrs, xdr_ptr));64}6566enum auth_stat67gssrpc__svcauth_none(struct svc_req *rqst, struct rpc_msg *msg,68bool_t *no_dispatch)69{70rqst->rq_xprt->xp_auth = &svc_auth_none;7172return (AUTH_OK);73}747576