s4-auth-krb: Move function to db-glue.c and make it static.
[mat/samba.git] / source4 / auth / kerberos / kerberos.h
index 31794b8e0346f262e5dadfe7ff22cf418d4d5cef..c57b13eb15ef0593b25ad72067dc73ef60672e43 100644 (file)
@@ -40,6 +40,12 @@ struct keytab_container {
        krb5_keytab keytab;
 };
 
+struct principal_container {
+       struct smb_krb5_context *smb_krb5_context;
+       krb5_principal principal;
+       const char *string_form; /* Optional */
+};
+
 /* not really ASN.1, but RFC 1964 */
 #define TOK_ID_KRB_AP_REQ      ((const uint8_t *)"\x01\x00")
 #define TOK_ID_KRB_AP_REP      ((const uint8_t *)"\x02\x00")
@@ -60,10 +66,6 @@ struct keytab_container {
 #define ENC_ALL_TYPES (ENC_CRC32 | ENC_RSA_MD5 | ENC_RC4_HMAC_MD5 |    \
                       ENC_HMAC_SHA1_96_AES128 | ENC_HMAC_SHA1_96_AES256)
 
-#ifndef HAVE_KRB5_SET_REAL_TIME
-krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds);
-#endif
-
 #ifndef HAVE_KRB5_SET_DEFAULT_TGS_KTYPES
 krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc);
 #endif
@@ -72,29 +74,11 @@ krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype
 krb5_error_code krb5_auth_con_setuseruserkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock *keyblock);
 #endif
 
-#ifndef HAVE_KRB5_FREE_UNPARSED_NAME
-void krb5_free_unparsed_name(krb5_context ctx, char *val);
-#endif
-
 #if defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING) && !defined(HAVE_KRB5_PRINC_COMPONENT)
 const krb5_data *krb5_princ_component(krb5_context context, krb5_principal principal, int i );
 #endif
 
 /* Samba wrapper function for krb5 functionality. */
-void setup_kaddr( krb5_address *pkaddr, struct sockaddr *paddr);
-int create_kerberos_key_from_string(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype);
-int create_kerberos_key_from_string_direct(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype);
-krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt);
-krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes);
-void free_kerberos_etypes(krb5_context context, krb5_enctype *enctypes);
-bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, bool remote);
-krb5_error_code ads_krb5_mk_req(krb5_context context, 
-                               krb5_auth_context *auth_context, 
-                               const krb5_flags ap_req_options,
-                               const char *principal,
-                               krb5_ccache ccache, 
-                               krb5_data *outbuf);
-bool get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt);
 krb5_error_code kerberos_kinit_password_cc(krb5_context ctx, krb5_ccache cc,
                                           krb5_principal principal, const char *password,
                                           krb5_principal impersonate_principal,
@@ -107,14 +91,6 @@ krb5_error_code kerberos_kinit_keyblock_cc(krb5_context ctx, krb5_ccache cc,
                                           const char *target_service,
                                           krb5_get_init_creds_opt *krb_options,
                                           time_t *expire_time, time_t *kdc_time);
-krb5_principal kerberos_fetch_salt_princ_for_host_princ(krb5_context context,
-                                                       krb5_principal host_princ,
-                                                       int enctype);
-void kerberos_set_creds_enctype(krb5_creds *pcreds, int enctype);
-bool kerberos_compatible_enctypes(krb5_context context, krb5_enctype enctype1, krb5_enctype enctype2);
-void kerberos_free_data_contents(krb5_context context, krb5_data *pdata);
-krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry);
-char *smb_get_krb5_error_message(krb5_context context, krb5_error_code code, TALLOC_CTX *mem_ctx);
 NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
                                 DATA_BLOB blob,
                                 krb5_context context,
@@ -140,9 +116,6 @@ NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
 struct loadparm_context;
 struct ldb_message;
 struct ldb_context;
-uint32_t kerberos_enctype_to_bitmap(krb5_enctype enc_type_enum);
-/* Translate between the Microsoft msDS-SupportedEncryptionTypes values and the IETF encryption type values */
-krb5_enctype kerberos_enctype_bitmap_to_enctype(uint32_t enctype_bitmap);
 krb5_error_code smb_krb5_update_keytab(TALLOC_CTX *parent_ctx,
                                       struct smb_krb5_context *smb_krb5_context,
                                       struct ldb_context *ldb,