diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-12-01 22:18:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:57 -0500 |
commit | 6913dddf644525f4bdadfb740b5bff41abe030b2 (patch) | |
tree | 5325b59915008cd16f1f5bf6ab242e8788b0b808 /source4/heimdal/lib/hdb/hdb.c | |
parent | f536c4a608bc8de3a9a0fd73f4c75f3183caa547 (diff) | |
download | samba-6913dddf644525f4bdadfb740b5bff41abe030b2.tar.gz samba-6913dddf644525f4bdadfb740b5bff41abe030b2.tar.bz2 samba-6913dddf644525f4bdadfb740b5bff41abe030b2.zip |
r12000: Update to current lorikeet-heimdal, including in particular support
for referencing an existing in-MEMORY keytab (required for the new way
we push that to GSSAPI).
Andrew Bartlett
(This used to be commit 2426581dfb9f5f0f9367f846c01dfd3c30fea954)
Diffstat (limited to 'source4/heimdal/lib/hdb/hdb.c')
-rw-r--r-- | source4/heimdal/lib/hdb/hdb.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/source4/heimdal/lib/hdb/hdb.c b/source4/heimdal/lib/hdb/hdb.c index e8161afbc1..df342ffadf 100644 --- a/source4/heimdal/lib/hdb/hdb.c +++ b/source4/heimdal/lib/hdb/hdb.c @@ -33,7 +33,7 @@ #include "hdb_locl.h" -RCSID("$Id: hdb.c,v 1.56 2005/10/19 13:51:40 lha Exp $"); +RCSID("$Id: hdb.c,v 1.59 2005/11/30 12:22:09 lha Exp $"); #ifdef HAVE_DLFCN_H #include <dlfcn.h> @@ -53,16 +53,17 @@ static struct hdb_method methods[] = { #endif #if defined(OPENLDAP) && !defined(OPENLDAP_MODULE) {"ldap:", hdb_ldap_create}, + {"ldapi:", hdb_ldapi_create}, #endif + {NULL, NULL} +}; + #if HAVE_DB1 || HAVE_DB3 - {"", hdb_db_create}, +static struct hdb_method dbmetod = {"", hdb_db_create }; #elif defined(HAVE_NDBM) - {"", hdb_ndbm_create}, -#elif defined(OPENLDAP) && !defined(OPENLDAP_MODULE) - {"", hdb_ldap_create}, +static struct hdb_method dbmetod = {"", hdb_ndbm_create }; #endif - {NULL, NULL} -}; + krb5_error_code hdb_next_enctype2key(krb5_context context, @@ -337,11 +338,22 @@ find_method (const char *filename, const char **rest) { const struct hdb_method *h; - for (h = methods; h->prefix != NULL; ++h) + for (h = methods; h->prefix != NULL; ++h) { if (strncmp (filename, h->prefix, strlen(h->prefix)) == 0) { *rest = filename + strlen(h->prefix); return h; } + } +#if defined(HAVE_DB1) || defined(HAVE_DB3) || defined(HAVE_NDBM) + if (strncmp(filename, "/", 1) == 0 + || strncmp(filename, "./", 2) == 0 + || strncmp(filename, "../", 3) == 0) + { + *rest = filename; + return &dbmetod; + } +#endif + return NULL; } @@ -367,8 +379,6 @@ hdb_list_builtin(krb5_context context, char **list) buf[0] = '\0'; for (h = methods; h->prefix != NULL; ++h) { - if (h->prefix[0] == '\0') - continue; if (h != methods) strlcat(buf, ", ", len); strlcat(buf, h->prefix, len); |