Ignore:
Timestamp:
Jan 15, 2010, 8:23:30 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 to 3.3.10 (source)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/libsmb/clikrb5.c

    r223 r370  
    2121*/
    2222
    23 #define KRB5_PRIVATE    1       /* this file uses PRIVATE interfaces! */
    24 #define KRB5_DEPRECATED 1       /* this file uses DEPRECATED interfaces! */
    25 
    2623#include "includes.h"
     24#include "smb_krb5.h"
     25#include "authdata.h"
    2726
    2827#ifdef HAVE_KRB5
     
    914913 krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry)
    915914{
    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)
    917923        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);
    920924#else
    921925#error UNKNOWN_KT_FREE_FUNCTION
     
    18431847        char *p = NULL;
    18441848
     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
     1852krb5_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
    18451858        ZERO_STRUCT(fwdData);
    18461859        ZERO_STRUCTP(authenticator);
     
    19221935#endif
    19231936
     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
     1948char *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
    19241962#else /* HAVE_KRB5 */
    19251963 /* this saves a few linking headaches */
Note: See TracChangeset for help on using the changeset viewer.