svn commit: samba r26440 - in branches/SAMBA_4_0: .
source/librpc/rpc source/ntvfs/common source/ntvfs/ipc
source/ntvfs/posix source/param source/param/tests
source/rpc_server source/rpc_server/srvsvc source/smb_server
jelmer at samba.org
jelmer at samba.org
Thu Dec 13 22:46:58 GMT 2007
Author: jelmer
Date: 2007-12-13 22:46:55 +0000 (Thu, 13 Dec 2007)
New Revision: 26440
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26440
Log:
Remove more uses of global_loadparm.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
branches/SAMBA_4_0/source/ntvfs/common/notify.c
branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c
branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c
branches/SAMBA_4_0/source/param/share.c
branches/SAMBA_4_0/source/param/share.h
branches/SAMBA_4_0/source/param/share_classic.c
branches/SAMBA_4_0/source/param/share_ldb.c
branches/SAMBA_4_0/source/param/tests/share.c
branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
branches/SAMBA_4_0/source/rpc_server/dcesrv_auth.c
branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c
branches/SAMBA_4_0/source/rpc_server/srvsvc/srvsvc_ntvfs.c
branches/SAMBA_4_0/source/smb_server/smb_server.c
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -439,7 +439,7 @@
NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
{
TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
- struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, lp_iconv_convenience(global_loadparm));
+ struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
enum ndr_err_code ndr_err;
uint16_t if_version=0;
@@ -466,7 +466,7 @@
static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax)
{
- struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx, lp_iconv_convenience(global_loadparm));
+ struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx, NULL);
ndr->flags |= LIBNDR_FLAG_NOALIGN;
Modified: branches/SAMBA_4_0/source/ntvfs/common/notify.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/common/notify.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/ntvfs/common/notify.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -82,6 +82,7 @@
*/
struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
struct messaging_context *messaging_ctx,
+ struct loadparm_context *lp_ctx,
struct event_context *ev,
struct share_config *scfg)
{
@@ -96,7 +97,7 @@
return NULL;
}
- notify->w = cluster_tdb_tmp_open(notify, global_loadparm, "notify.tdb", TDB_SEQNUM);
+ notify->w = cluster_tdb_tmp_open(notify, lp_ctx, "notify.tdb", TDB_SEQNUM);
if (notify->w == NULL) {
talloc_free(notify);
return NULL;
Modified: branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -41,7 +41,7 @@
r->out.available = 0;
r->out.info = NULL;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(global_loadparm), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(global_loadparm), global_loadparm, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return nterr;
}
Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -214,6 +214,7 @@
pvfs->notify_context = notify_init(pvfs,
pvfs->ntvfs->ctx->server_id,
pvfs->ntvfs->ctx->msg_ctx,
+ pvfs->ntvfs->ctx->lp_ctx,
event_context_find(pvfs),
pvfs->ntvfs->ctx->config);
Modified: branches/SAMBA_4_0/source/param/share.c
===================================================================
--- branches/SAMBA_4_0/source/param/share.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/param/share.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -127,6 +127,7 @@
}
NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name,
+ struct loadparm_context *lp_ctx,
struct share_context **ctx)
{
const struct share_ops *ops;
@@ -137,7 +138,7 @@
return NT_STATUS_INTERNAL_ERROR;
}
- return ops->init(mem_ctx, ops, ctx);
+ return ops->init(mem_ctx, ops, lp_ctx, ctx);
}
/*
Modified: branches/SAMBA_4_0/source/param/share.h
===================================================================
--- branches/SAMBA_4_0/source/param/share.h 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/param/share.h 2007-12-13 22:46:55 UTC (rev 26440)
@@ -49,7 +49,8 @@
struct share_ops {
const char *name;
- NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct share_context **);
+ NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct loadparm_context *lp_ctx,
+ struct share_context **);
const char *(*string_option)(struct share_config *, const char *, const char *);
int (*int_option)(struct share_config *, const char *, int);
bool (*bool_option)(struct share_config *, const char *, bool);
Modified: branches/SAMBA_4_0/source/param/share_classic.c
===================================================================
--- branches/SAMBA_4_0/source/param/share_classic.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/param/share_classic.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -25,6 +25,7 @@
static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx,
const struct share_ops *ops,
+ struct loadparm_context *lp_ctx,
struct share_context **ctx)
{
*ctx = talloc(mem_ctx, struct share_context);
@@ -34,7 +35,7 @@
}
(*ctx)->ops = ops;
- (*ctx)->priv_data = global_loadparm;
+ (*ctx)->priv_data = lp_ctx;
return NT_STATUS_OK;
}
Modified: branches/SAMBA_4_0/source/param/share_ldb.c
===================================================================
--- branches/SAMBA_4_0/source/param/share_ldb.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/param/share_ldb.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -27,7 +27,8 @@
#include "param/share.h"
#include "param/param.h"
-static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, struct share_context **ctx)
+static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, struct loadparm_context *lp_ctx,
+ struct share_context **ctx)
{
struct ldb_context *sdb;
@@ -37,9 +38,9 @@
return NT_STATUS_NO_MEMORY;
}
- sdb = ldb_wrap_connect(*ctx, global_loadparm,
- private_path(*ctx, global_loadparm, "share.ldb"),
- system_session(*ctx, global_loadparm),
+ sdb = ldb_wrap_connect(*ctx, lp_ctx,
+ private_path(*ctx, lp_ctx, "share.ldb"),
+ system_session(*ctx, lp_ctx),
NULL, 0, NULL);
if (!sdb) {
Modified: branches/SAMBA_4_0/source/param/tests/share.c
===================================================================
--- branches/SAMBA_4_0/source/param/tests/share.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/param/tests/share.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -178,12 +178,12 @@
static bool setup_ldb(struct torture_context *tctx, void **data)
{
- return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "ldb", (struct share_context **)data));
+ return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "ldb", tctx->lp_ctx, (struct share_context **)data));
}
static bool setup_classic(struct torture_context *tctx, void **data)
{
- return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "classic", (struct share_context **)data));
+ return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "classic", tctx->lp_ctx, (struct share_context **)data));
}
static bool teardown(struct torture_context *tctx, void *data)
Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -822,7 +822,7 @@
}
pull = ndr_pull_init_blob(&call->pkt.u.request.stub_and_verifier, call,
- lp_iconv_convenience(global_loadparm));
+ lp_iconv_convenience(call->conn->dce_ctx->lp_ctx));
NT_STATUS_HAVE_NO_MEMORY(pull);
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
@@ -885,7 +885,7 @@
}
/* form the reply NDR */
- push = ndr_push_init_ctx(call, lp_iconv_convenience(global_loadparm));
+ push = ndr_push_init_ctx(call, lp_iconv_convenience(call->conn->dce_ctx->lp_ctx));
NT_STATUS_HAVE_NO_MEMORY(push);
/* carry over the pointer count to the reply in case we are
Modified: branches/SAMBA_4_0/source/rpc_server/dcesrv_auth.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcesrv_auth.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/rpc_server/dcesrv_auth.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -406,7 +406,7 @@
return NT_STATUS_IS_OK(status);
}
- ndr = ndr_push_init_ctx(call, lp_iconv_convenience(global_loadparm));
+ ndr = ndr_push_init_ctx(call, lp_iconv_convenience(dce_conn->dce_ctx->lp_ctx));
if (!ndr) {
return false;
}
Modified: branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -444,7 +444,7 @@
int count = 8;
int i;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
@@ -542,7 +542,7 @@
int count = 10;
int i;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
@@ -734,7 +734,7 @@
/* TODO: - paging of results
*/
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
@@ -983,7 +983,7 @@
return WERR_INVALID_PARAM;
}
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
@@ -1237,7 +1237,7 @@
return WERR_INVALID_PARAM;
}
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
@@ -1414,7 +1414,7 @@
}
all_string_sub(device, "\\", "/", 0);
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
@@ -1828,7 +1828,7 @@
/* TODO: - paging of results
*/
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
@@ -2291,7 +2291,7 @@
NTSTATUS nterr;
struct share_context *sctx;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return ntstatus_to_werror(nterr);
}
Modified: branches/SAMBA_4_0/source/rpc_server/srvsvc/srvsvc_ntvfs.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/srvsvc/srvsvc_ntvfs.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/rpc_server/srvsvc/srvsvc_ntvfs.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -62,7 +62,7 @@
struct share_config *scfg;
const char *sharetype;
- status = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), &sctx);
+ status = share_get_context_by_name(mem_ctx, lp_share_backend(dce_call->conn->dce_ctx->lp_ctx), dce_call->conn->dce_ctx->lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
Modified: branches/SAMBA_4_0/source/smb_server/smb_server.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb_server.c 2007-12-13 22:46:51 UTC (rev 26439)
+++ branches/SAMBA_4_0/source/smb_server/smb_server.c 2007-12-13 22:46:55 UTC (rev 26440)
@@ -157,7 +157,7 @@
smbsrv_management_init(smb_conn);
if (!NT_STATUS_IS_OK(share_get_context_by_name(smb_conn, lp_share_backend(smb_conn->lp_ctx),
- &(smb_conn->share_context)))) {
+ smb_conn->lp_ctx, &(smb_conn->share_context)))) {
smbsrv_terminate_connection(smb_conn, "share_init failed!");
return;
}
More information about the samba-cvs
mailing list