diff options
author | Sumit Bose <sbose@redhat.com> | 2011-02-14 16:56:25 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-02-14 11:51:42 -0500 |
commit | bd880fde928e0cb0eee5d59e2fd5f26d75698b5c (patch) | |
tree | 99ccff6a6e9af659ff0097f7ca5f9c676cb9d668 /src/db | |
parent | 29dfae2a89551026f861f1f857187c22e30730c9 (diff) | |
download | sssd-bd880fde928e0cb0eee5d59e2fd5f26d75698b5c.tar.gz sssd-bd880fde928e0cb0eee5d59e2fd5f26d75698b5c.tar.bz2 sssd-bd880fde928e0cb0eee5d59e2fd5f26d75698b5c.zip |
Check LDB_MODULES_PATH for sysdb
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index e222c8be..521ae9d2 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -25,11 +25,14 @@ #include "confdb/confdb.h" #include <time.h> +#define LDB_MODULES_PATH "LDB_MODULES_PATH" + static errno_t sysdb_ldb_connect(TALLOC_CTX *mem_ctx, const char *filename, struct ldb_context **_ldb) { int ret; struct ldb_context *ldb; + const char *mod_path; if (_ldb == NULL) { return EINVAL; @@ -45,6 +48,12 @@ static errno_t sysdb_ldb_connect(TALLOC_CTX *mem_ctx, const char *filename, return EIO; } + mod_path = getenv(LDB_MODULES_PATH); + if (mod_path != NULL) { + DEBUG(9, ("Setting ldb module path to [%s].\n", mod_path)); + ldb_set_modules_dir(ldb, mod_path); + } + ret = ldb_connect(ldb, filename, 0, NULL); if (ret != LDB_SUCCESS) { return EIO; |