summaryrefslogtreecommitdiff
path: root/server/nss/nsssrv_ldb.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2008-11-24 11:23:10 -0500
committerSimo Sorce <idra@samba.org>2008-11-24 17:44:37 -0500
commit8c77f1f01f16c05cd8867584b5acf181ef8ce9e0 (patch)
treedaea5886d40b14cf6becb33da266bdc334331665 /server/nss/nsssrv_ldb.c
parent98bf10fa12c08463a1f625403c4621f1bbeb0bcc (diff)
downloadsssd-8c77f1f01f16c05cd8867584b5acf181ef8ce9e0.tar.gz
sssd-8c77f1f01f16c05cd8867584b5acf181ef8ce9e0.tar.bz2
sssd-8c77f1f01f16c05cd8867584b5acf181ef8ce9e0.zip
Replacing hard-coded paths with configure script substitutions.
Changing the default SBUS locations to be configure script parameters
Diffstat (limited to 'server/nss/nsssrv_ldb.c')
-rw-r--r--server/nss/nsssrv_ldb.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/nss/nsssrv_ldb.c b/server/nss/nsssrv_ldb.c
index 6385c5ac..8ad908a4 100644
--- a/server/nss/nsssrv_ldb.c
+++ b/server/nss/nsssrv_ldb.c
@@ -675,6 +675,7 @@ static int nss_ldb_read_conf(TALLOC_CTX *mem_ctx,
{
struct nss_ldb_ctx *ctx;
TALLOC_CTX *tmp_ctx;
+ char *default_ldb_path;
int ret;
tmp_ctx = talloc_new(mem_ctx);
@@ -687,8 +688,15 @@ static int nss_ldb_read_conf(TALLOC_CTX *mem_ctx,
goto done;
}
+ default_ldb_path = talloc_asprintf(tmp_ctx, "%s/%s", DB_PATH, NSS_DEF_LDB_FILE);
+ if (default_ldb_path == NULL) {
+ ret = ENOMEM;
+ goto done;
+ }
+
nss_ldb_read_var(tmp_ctx, cdb, ctx, "ldbFile",
- NSS_DEF_LDB_PATH, &ctx->ldb_file);
+ default_ldb_path, &ctx->ldb_file);
+ DEBUG(3, ("NSS LDB Cache Path: %s\n", ctx->ldb_file));
nss_ldb_read_var(tmp_ctx, cdb, ctx, "userBase",
NSS_DEF_USER_BASE, &ctx->user_base);