(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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user