6
6
basically this is a wrapper around ldap
10
* This should be under the HAVE_KRB5 flag but since they're used
11
* in lp_kerberos_method(), they ned to be always available
13
#define KERBEROS_VERIFY_SECRETS 0
14
#define KERBEROS_VERIFY_SYSTEM_KEYTAB 1
15
#define KERBEROS_VERIFY_DEDICATED_KEYTAB 2
16
#define KERBEROS_VERIFY_SECRETS_AND_KEYTAB 3
19
* If you add any entries to the above, please modify the below expressions
20
* so they remain accurate.
22
#define USE_KERBEROS_KEYTAB (KERBEROS_VERIFY_SECRETS != lp_kerberos_method())
23
#define USE_SYSTEM_KEYTAB \
24
((KERBEROS_VERIFY_SECRETS_AND_KEYTAB == lp_kerberos_method()) || \
25
(KERBEROS_VERIFY_SYSTEM_KEYTAB == lp_kerberos_method()))
9
27
enum wb_posix_mapping {
10
28
WB_POSIX_MAP_UNKNOWN = -1,
11
29
WB_POSIX_MAP_TEMPLATE = 0,
339
357
/* Kerberos environment variable names */
340
358
#define KRB5_ENV_CCNAME "KRB5CCNAME"
342
/* Heimdal uses a slightly different name */
343
#if defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5)
344
#define ENCTYPE_ARCFOUR_HMAC ENCTYPE_ARCFOUR_HMAC_MD5
347
/* The older versions of heimdal that don't have this
348
define don't seem to use it anyway. I'm told they
349
always use a subkey */
350
#ifndef HAVE_AP_OPTS_USE_SUBKEY
351
#define AP_OPTS_USE_SUBKEY 0
354
360
#define WELL_KNOWN_GUID_COMPUTERS "AA312825768811D1ADED00C04FD8D5CD"
355
361
#define WELL_KNOWN_GUID_USERS "A9D1CA15768811D1ADED00C04FD8D5CD"
357
#ifndef KRB5_ADDR_NETBIOS
358
#define KRB5_ADDR_NETBIOS 0x14
361
#ifndef KRB5KRB_ERR_RESPONSE_TOO_BIG
362
#define KRB5KRB_ERR_RESPONSE_TOO_BIG (-1765328332L)
367
#if defined(HAVE_MAGIC_IN_KRB5_ADDRESS) && defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) /* MIT */
368
krb5_address **addrs;
369
#elif defined(HAVE_KRB5_ADDRESSES) /* Heimdal */
370
krb5_addresses *addrs;
372
#error UNKNOWN_KRB5_ADDRESS_TYPE
373
#endif /* defined(HAVE_MAGIC_IN_KRB5_ADDRESS) && defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) */
374
} smb_krb5_addresses;
376
#ifdef HAVE_KRB5_KEYBLOCK_KEYVALUE /* Heimdal */
377
#define KRB5_KEY_TYPE(k) ((k)->keytype)
378
#define KRB5_KEY_LENGTH(k) ((k)->keyvalue.length)
379
#define KRB5_KEY_DATA(k) ((k)->keyvalue.data)
380
#define KRB5_KEY_DATA_CAST void
382
#define KRB5_KEY_TYPE(k) ((k)->enctype)
383
#define KRB5_KEY_LENGTH(k) ((k)->length)
384
#define KRB5_KEY_DATA(k) ((k)->contents)
385
#define KRB5_KEY_DATA_CAST krb5_octet
386
#endif /* HAVE_KRB5_KEYBLOCK_KEYVALUE */
388
#ifdef HAVE_KRB5_KEYTAB_ENTRY_KEY /* MIT */
389
#define KRB5_KT_KEY(k) (&(k)->key)
390
#elif HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK /* Heimdal */
391
#define KRB5_KT_KEY(k) (&(k)->keyblock)
393
#error krb5_keytab_entry has no key or keyblock member
394
#endif /* HAVE_KRB5_KEYTAB_ENTRY_KEY */
396
#endif /* HAVE_KRB5 */
398
363
enum ads_extended_dn_flags {
399
364
ADS_EXTENDED_DN_HEX_STRING = 0,
400
365
ADS_EXTENDED_DN_STRING = 1 /* not supported on win2k */