(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
This commit is contained in:
Love Hörnquist Åstrand
2005-11-30 12:22:09 +00:00
parent 116c7fa6f6
commit 6e58db8120

View File

@@ -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;
}