From 6e58db8120d55fbae0662acee2f58b1657b5c8d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 30 Nov 2005 12:22:09 +0000 Subject: [PATCH] (find_method): accept relative paths as old db format too. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16318 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hdb/hdb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/hdb/hdb.c b/lib/hdb/hdb.c index 9ac65f3e2..5f30d337f 100644 --- a/lib/hdb/hdb.c +++ b/lib/hdb/hdb.c @@ -53,6 +53,7 @@ static struct hdb_method methods[] = { #endif #if defined(OPENLDAP) && !defined(OPENLDAP_MODULE) {"ldap:", hdb_ldap_create}, + {"ldapi:", hdb_ldapi_create}, #endif {NULL, NULL} }; @@ -334,7 +335,10 @@ find_method (const char *filename, const char **rest) } } #if defined(HAVE_DB1) || defined(HAVE_DB3) || defined(HAVE_NDBM) - if (filename[0] == '/') { + if (strncmp(filename, "/", 1) == 0 + || strncmp(filename, "./", 2) == 0 + || strncmp(filename, "../", 3) == 0) + { *rest = filename; return &dbmetod; }