summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-02-14 16:56:25 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-02-14 11:51:42 -0500
commitbd880fde928e0cb0eee5d59e2fd5f26d75698b5c (patch)
tree99ccff6a6e9af659ff0097f7ca5f9c676cb9d668 /src/db/sysdb.c
parent29dfae2a89551026f861f1f857187c22e30730c9 (diff)
downloadsssd-bd880fde928e0cb0eee5d59e2fd5f26d75698b5c.tar.gz
sssd-bd880fde928e0cb0eee5d59e2fd5f26d75698b5c.tar.xz
sssd-bd880fde928e0cb0eee5d59e2fd5f26d75698b5c.zip
Check LDB_MODULES_PATH for sysdb
Diffstat (limited to 'src/db/sysdb.c')
-rw-r--r--src/db/sysdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index e222c8be7..521ae9d2a 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;