Changeset 370 for branches/samba-3.3.x/source/libsmb/clikrb5.c
- Timestamp:
- Jan 15, 2010, 8:23:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/libsmb/clikrb5.c
r223 r370 21 21 */ 22 22 23 #define KRB5_PRIVATE 1 /* this file uses PRIVATE interfaces! */24 #define KRB5_DEPRECATED 1 /* this file uses DEPRECATED interfaces! */25 26 23 #include "includes.h" 24 #include "smb_krb5.h" 25 #include "authdata.h" 27 26 28 27 #ifdef HAVE_KRB5 … … 914 913 krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry) 915 914 { 916 #if defined(HAVE_KRB5_KT_FREE_ENTRY) 915 /* Try krb5_free_keytab_entry_contents first, since 916 * MIT Kerberos >= 1.7 has both krb5_free_keytab_entry_contents and 917 * krb5_kt_free_entry but only has a prototype for the first, while the 918 * second is considered private. 919 */ 920 #if defined(HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS) 921 return krb5_free_keytab_entry_contents(context, kt_entry); 922 #elif defined(HAVE_KRB5_KT_FREE_ENTRY) 917 923 return krb5_kt_free_entry(context, kt_entry); 918 #elif defined(HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS)919 return krb5_free_keytab_entry_contents(context, kt_entry);920 924 #else 921 925 #error UNKNOWN_KT_FREE_FUNCTION … … 1843 1847 char *p = NULL; 1844 1848 1849 /* MIT krb5 1.7beta3 (in Ubuntu Karmic) is missing the prototype, 1850 but still has the symbol */ 1851 #if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE 1852 krb5_error_code krb5_auth_con_set_req_cksumtype( 1853 krb5_context context, 1854 krb5_auth_context auth_context, 1855 krb5_cksumtype cksumtype); 1856 #endif 1857 1845 1858 ZERO_STRUCT(fwdData); 1846 1859 ZERO_STRUCTP(authenticator); … … 1922 1935 #endif 1923 1936 1937 /* 1938 * smb_krb5_principal_get_realm 1939 * 1940 * @brief Get realm of a principal 1941 * 1942 * @param[in] context The krb5_context 1943 * @param[in] principal The principal 1944 * @return pointer to the realm 1945 * 1946 */ 1947 1948 char *smb_krb5_principal_get_realm(krb5_context context, 1949 krb5_principal principal) 1950 { 1951 #ifdef HAVE_KRB5_PRINCIPAL_GET_REALM /* Heimdal */ 1952 return krb5_principal_get_realm(context, principal); 1953 #elif defined(krb5_princ_realm) /* MIT */ 1954 krb5_data *realm; 1955 realm = krb5_princ_realm(context, principal); 1956 return (char *)realm->data; 1957 #else 1958 return NULL; 1959 #endif 1960 } 1961 1924 1962 #else /* HAVE_KRB5 */ 1925 1963 /* this saves a few linking headaches */
Note:
See TracChangeset
for help on using the changeset viewer.