sss_krb5.h revision 03713859dffacc7142393e53c73d8d4cf7dee8d5
/*
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2009-2010 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SSS_KRB5_H__
#define __SSS_KRB5_H__
#include "config.h"
#include <stdbool.h>
#include <talloc.h>
#ifdef HAVE_KRB5_KRB5_H
#else
#include <krb5.h>
#endif
#define KRB5_CHILD_LOG_FILE "krb5_child"
#define LDAP_CHILD_LOG_FILE "ldap_child"
/* MIT Kerberos has the same hardcoded warning interval of 7 days. Due to the
* fact that using the expiration time of a Kerberos password with LDAP
* authentication is presumably a rare case a separate config option is not
* necessary. */
#if defined HAVE_KRB5_CC_CACHE_MATCH && defined HAVE_KRB5_CC_GET_FULL_NAME
#define HAVE_KRB5_DIRCACHE 1
#endif
const char *__krb5_error_msg; \
} while(0)
const char *client_princ_str, bool *result);
const char *pattern_primary,
const char *pattern_realm,
const char *hostname,
const char *desired_realm,
const char *keytab_name,
char **_principal,
char **_primary,
char **_realm);
#endif
void *data);
const char *fast_ccache_name);
#else
#define SSS_KRB5_FAST_REQUIRED 0
#endif
#ifndef HAVE_KRB5_PARSE_NAME_FLAGS
#define KRB5_PRINCIPAL_PARSE_NO_REALM 0x1
#define KRB5_PRINCIPAL_PARSE_REQUIRE_REALM 0x2
#define KRB5_PRINCIPAL_PARSE_ENTERPRISE 0x4
#endif
#ifndef HAVE_KRB5_UNPARSE_NAME_FLAGS
#define KRB5_PRINCIPAL_UNPARSE_SHORT 0x1
#define KRB5_PRINCIPAL_UNPARSE_NO_REALM 0x2
#define KRB5_PRINCIPAL_UNPARSE_DISPLAY 0x4
#endif
int canonicalize);
enum sss_krb5_cc_type {
#ifdef HAVE_KRB5_DIRCACHE
#endif /* HAVE_KRB5_DIRCACHE */
};
enum sss_krb5_cc_type
sss_krb5_get_type(const char *full_location);
const char *
const char *
sss_krb5_cc_file_path(const char *full_location);
const char *
sss_krb5_residual_check_type(const char *full_location,
enum sss_krb5_cc_type expected_type);
/* === Compatibility routines for the Heimdal Kerberos implementation === */
#ifdef HAVE_KRB5_TICKET_TIMES
typedef krb5_ticket_times sss_krb5_ticket_times;
typedef krb5_times sss_krb5_ticket_times;
#endif
/* Redirect libkrb5 tracing towards our DEBUG statements */
krb5_authdata *const *ticket_authdata,
krb5_authdata *const *ap_req_authdata,
krb5_authdata ***results);
errno_t sss_krb5_touch_config(void);
#endif /* __SSS_KRB5_H__ */