X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=mod_auth_gssapi.h;h=be21b9b118694010e3218ca6ab9d264b1365827d;hb=573516c46b5823b6be0eb4b1832cc597c7ab0c15;hp=a8f8a8dc85f9cf6d2d9c4cb9f6a7960d985c712e;hpb=5e863ddff6ef99a59acfb3c41f0b86ebc1468be7;p=mod_auth_kerb.cvs%2F.git diff --git a/mod_auth_gssapi.h b/mod_auth_gssapi.h index a8f8a8d..be21b9b 100644 --- a/mod_auth_gssapi.h +++ b/mod_auth_gssapi.h @@ -1,46 +1,46 @@ +/* + * Copyright (c) 2010 CESNET + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of CESNET nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + #ifndef __MOD_AUTH_GSSAPI_H__ #define __MOD_AUTH_GSSAPI_H__ -#include -#include -#include -#include -#include -#include - -#include -#include +#include -#include -/* XXX */ #define GSS_KRB5_NT_PRINCIPAL_NAME 0xdeaddead #ifndef GSSAPI_SUPPORTS_SPNEGO #include "spnegokrb5.h" #endif -#define SERVICE_NAME "HTTP" - -typedef struct { - const char *service_name; - const char *krb5_keytab; -} gss_auth_config; - -typedef struct gss_conn_ctx_t { - gss_ctx_id_t context; - enum { - GSS_CTX_EMPTY, - GSS_CTX_IN_PROGRESS, - GSS_CTX_ESTABLISHED, - } state; - char *user; -} *gss_conn_ctx; - -void -gss_log(const char *file, int line, int level, int status, - const request_rec *r, const char *fmt, ...); +static int +gss_authenticate_user(request_rec *r); -int -gss_authenticate(request_rec *r, gss_auth_config *conf, gss_conn_ctx ctx, - const char *auth_line, char **negotiate_ret_value); #endif