s4-kerberos: obey the credentials setting for forwardable tickets
[metze/samba/wip.git] / source4 / auth / kerberos / kerberos.h
index 96c11a4ce1a36c6eda671bf072a6c2a4bface72c..b58014f4930a6db309ebf4431f2f4725e3138393 100644 (file)
@@ -53,6 +53,9 @@ struct keytab_container {
 #define KRB5_KEY_DATA(k)       ((k)->contents)
 #endif /* HAVE_KRB5_KEYBLOCK_KEYVALUE */
 
+#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
@@ -91,11 +94,13 @@ bool get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_tick
 krb5_error_code kerberos_kinit_password_cc(krb5_context ctx, krb5_ccache cc,
                                           krb5_principal principal, const char *password,
                                           krb5_principal impersonate_principal, const char *target_service,
+                                          krb5_get_init_creds_opt *krb_options,
                                           time_t *expire_time, time_t *kdc_time);
 krb5_error_code kerberos_kinit_keyblock_cc(krb5_context ctx, krb5_ccache cc,
-                              krb5_principal principal, krb5_keyblock *keyblock,
-                              const char *target_service,
-                              time_t *expire_time, time_t *kdc_time);
+                                          krb5_principal principal, krb5_keyblock *keyblock,
+                                          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);
@@ -137,6 +142,9 @@ NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
                                     time_t tgs_authtime,
                                     DATA_BLOB *pac);
 struct loadparm_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);
 
 #include "auth/kerberos/proto.h"