summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/samdb_privilege.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-25 17:19:03 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-25 17:19:03 +1100
commit54bd30f70632b8fcbe164133d2479092b7262a29 (patch)
tree588c4019f409b8234a15a53959d908cc9695e606 /source4/dsdb/samdb/samdb_privilege.c
parentb55a5adab99f535bb392662d54afbabed116a3b6 (diff)
downloadsamba-54bd30f70632b8fcbe164133d2479092b7262a29.tar.gz
samba-54bd30f70632b8fcbe164133d2479092b7262a29.tar.bz2
samba-54bd30f70632b8fcbe164133d2479092b7262a29.zip
s4-samdb: reduce the number of samdb opens at startup
Using common parameters means that the ldb_wrap code can return a reference rather than a new database
Diffstat (limited to 'source4/dsdb/samdb/samdb_privilege.c')
-rw-r--r--source4/dsdb/samdb/samdb_privilege.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/source4/dsdb/samdb/samdb_privilege.c b/source4/dsdb/samdb/samdb_privilege.c
index dcb96d8c0e..81b9381b22 100644
--- a/source4/dsdb/samdb/samdb_privilege.c
+++ b/source4/dsdb/samdb/samdb_privilege.c
@@ -33,17 +33,8 @@ struct ldb_context *privilege_connect(TALLOC_CTX *mem_ctx,
struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx)
{
- char *path;
- struct ldb_context *pdb;
-
- path = private_path(mem_ctx, lp_ctx, "privilege.ldb");
- if (!path) return NULL;
-
- pdb = ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, path,
- NULL, NULL, 0);
- talloc_free(path);
-
- return pdb;
+ return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, "privilege.ldb",
+ NULL, NULL, 0);
}
/*