summaryrefslogtreecommitdiff
path: root/source4/ldap_server
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/ldap_server
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/ldap_server')
-rw-r--r--source4/ldap_server/ldap_server.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index c45a4168f9..63bfc70b2a 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -468,11 +468,9 @@ static void ldapsrv_accept_priv(struct stream_connection *c)
struct ldapsrv_service *ldapsrv_service = talloc_get_type_abort(
c->private_data, struct ldapsrv_service);
struct auth_session_info *session_info;
- NTSTATUS status;
- status = auth_system_session_info(
- c, ldapsrv_service->task->lp_ctx, &session_info);
- if (!NT_STATUS_IS_OK(status)) {
+ session_info = system_session(ldapsrv_service->task->lp_ctx);
+ if (!session_info) {
stream_terminate_connection(c, "failed to setup system "
"session info");
return;