summaryrefslogtreecommitdiff
path: root/source4/ntptr/simple_ldb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-08 23:32:43 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:57 +0100
commita72c5053c587f0ed6113ef514fe3739cb81e7abf (patch)
tree6099f21bea03a584363c76c6b87a0f648f35d44e /source4/ntptr/simple_ldb
parentdd7e5ed88c48f4ee39e53be07c8839791e914e45 (diff)
downloadsamba-a72c5053c587f0ed6113ef514fe3739cb81e7abf.tar.gz
samba-a72c5053c587f0ed6113ef514fe3739cb81e7abf.tar.bz2
samba-a72c5053c587f0ed6113ef514fe3739cb81e7abf.zip
r26353: Remove use of global_loadparm.
(This used to be commit 17637e4490e42db6cdef619286c4d5a0982e9d1a)
Diffstat (limited to 'source4/ntptr/simple_ldb')
-rw-r--r--source4/ntptr/simple_ldb/ntptr_simple_ldb.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
index 9a9fa626ef..4e6586db65 100644
--- a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
+++ b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
@@ -87,7 +87,7 @@ static int sptr_db_search(struct ldb_context *ldb,
static NTSTATUS sptr_init_context(struct ntptr_context *ntptr)
{
- struct ldb_context *sptr_db = sptr_db_connect(ntptr, global_loadparm);
+ struct ldb_context *sptr_db = sptr_db_connect(ntptr, ntptr->lp_ctx);
NT_STATUS_HAVE_NO_MEMORY(sptr_db);
ntptr->private_data = sptr_db;
@@ -170,9 +170,9 @@ static WERROR sptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC
enum ndr_err_code ndr_err;
struct spoolss_OSVersion os;
- os.major = dcesrv_common_get_version_major(mem_ctx, global_loadparm);
- os.minor = dcesrv_common_get_version_minor(mem_ctx, global_loadparm);
- os.build = dcesrv_common_get_version_build(mem_ctx, global_loadparm);
+ os.major = dcesrv_common_get_version_major(mem_ctx, server->ntptr->lp_ctx);
+ os.minor = dcesrv_common_get_version_minor(mem_ctx, server->ntptr->lp_ctx);
+ os.build = dcesrv_common_get_version_build(mem_ctx, server->ntptr->lp_ctx);
os.extra_string = "";
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &os, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersion);
@@ -188,9 +188,9 @@ static WERROR sptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC
enum ndr_err_code ndr_err;
struct spoolss_OSVersionEx os_ex;
- os_ex.major = dcesrv_common_get_version_major(mem_ctx, global_loadparm);
- os_ex.minor = dcesrv_common_get_version_minor(mem_ctx, global_loadparm);
- os_ex.build = dcesrv_common_get_version_build(mem_ctx, global_loadparm);
+ os_ex.major = dcesrv_common_get_version_major(mem_ctx, server->ntptr->lp_ctx);
+ os_ex.minor = dcesrv_common_get_version_minor(mem_ctx, server->ntptr->lp_ctx);
+ os_ex.build = dcesrv_common_get_version_build(mem_ctx, server->ntptr->lp_ctx);
os_ex.extra_string = "";
os_ex.unknown2 = 0;
os_ex.unknown3 = 0;
@@ -204,12 +204,12 @@ static WERROR sptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC
r->out.data.binary = blob;
return WERR_OK;
} else if (strcmp("DNSMachineName", r->in.value_name) == 0) {
- if (!lp_realm(global_loadparm)) return WERR_INVALID_PARAM;
+ if (!lp_realm(server->ntptr->lp_ctx)) return WERR_INVALID_PARAM;
r->out.type = SPOOLSS_PRINTER_DATA_TYPE_STRING;
r->out.data.string = talloc_asprintf(mem_ctx, "%s.%s",
- lp_netbios_name(global_loadparm),
- lp_realm(global_loadparm));
+ lp_netbios_name(server->ntptr->lp_ctx),
+ lp_realm(server->ntptr->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(r->out.data.string);
return WERR_OK;
}