diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-08 23:32:43 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:57 +0100 |
commit | a72c5053c587f0ed6113ef514fe3739cb81e7abf (patch) | |
tree | 6099f21bea03a584363c76c6b87a0f648f35d44e /source4/ntvfs | |
parent | dd7e5ed88c48f4ee39e53be07c8839791e914e45 (diff) | |
download | samba-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/ntvfs')
-rw-r--r-- | source4/ntvfs/cifs/vfs_cifs.c | 6 | ||||
-rw-r--r-- | source4/ntvfs/common/opendb_tdb.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/ipc/vfs_ipc.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs.h | 1 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs_base.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_shortname.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/print/vfs_print.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/unixuid/vfs_unixuid.c | 2 |
9 files changed, 13 insertions, 10 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index cd4e363906..152a4056c5 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -166,7 +166,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, return NT_STATUS_NO_MEMORY; } cli_credentials_set_event_context(credentials, ntvfs->ctx->event_ctx); - cli_credentials_set_conf(credentials, global_loadparm); + cli_credentials_set_conf(credentials, ntvfs->ctx->lp_ctx); cli_credentials_set_username(credentials, user, CRED_SPECIFIED); if (domain) { cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED); @@ -176,7 +176,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, DEBUG(5, ("CIFS backend: Using machine account\n")); credentials = cli_credentials_init(private); cli_credentials_set_event_context(credentials, ntvfs->ctx->event_ctx); - cli_credentials_set_conf(credentials, global_loadparm); + cli_credentials_set_conf(credentials, ntvfs->ctx->lp_ctx); if (domain) { cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED); } @@ -198,7 +198,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, io.in.called_name = host; io.in.credentials = credentials; io.in.fallback_to_anonymous = false; - io.in.workgroup = lp_workgroup(global_loadparm); + io.in.workgroup = lp_workgroup(ntvfs->ctx->lp_ctx); io.in.service = remote_share; io.in.service_type = "?????"; diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c index 9926bf8d3e..b8b8a5cb33 100644 --- a/source4/ntvfs/common/opendb_tdb.c +++ b/source4/ntvfs/common/opendb_tdb.c @@ -88,7 +88,7 @@ static struct odb_context *odb_tdb_init(TALLOC_CTX *mem_ctx, odb->ntvfs_ctx = ntvfs_ctx; /* leave oplocks disabled by default until the code is working */ - odb->oplocks = lp_parm_bool(global_loadparm, NULL, "opendb", "oplocks", false); + odb->oplocks = lp_parm_bool(ntvfs_ctx->lp_ctx, NULL, "opendb", "oplocks", false); return odb; } diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index 4a5ddd7a9c..b69fb98c5d 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -109,7 +109,7 @@ static NTSTATUS ipc_connect(struct ntvfs_module_context *ntvfs, private->pipe_list = NULL; /* setup the DCERPC server subsystem */ - status = dcesrv_init_ipc_context(private, global_loadparm, &private->dcesrv); + status = dcesrv_init_ipc_context(private, ntvfs->ctx->lp_ctx, &private->dcesrv); NT_STATUS_NOT_OK_RETURN(status); return NT_STATUS_OK; diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h index 9ac6f85321..fe5f956426 100644 --- a/source4/ntvfs/ntvfs.h +++ b/source4/ntvfs/ntvfs.h @@ -187,6 +187,7 @@ struct ntvfs_context { struct share_config *config; struct server_id server_id; + struct loadparm_context *lp_ctx; struct event_context *event_ctx; struct messaging_context *msg_ctx; diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c index 20197a4ba9..9172fe1580 100644 --- a/source4/ntvfs/ntvfs_base.c +++ b/source4/ntvfs/ntvfs_base.c @@ -154,6 +154,7 @@ _PUBLIC_ bool ntvfs_interface_differs(const struct ntvfs_critical_sizes *const i NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, enum ntvfs_type type, enum protocol_types protocol, struct event_context *ev, struct messaging_context *msg, + struct loadparm_context *lp_ctx, struct server_id server_id, struct ntvfs_context **_ctx) { const char **handlers = share_string_list_option(mem_ctx, scfg, SHARE_NTVFS_HANDLER); @@ -172,6 +173,7 @@ NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, e ctx->event_ctx = ev; ctx->msg_ctx = msg; ctx->server_id = server_id; + ctx->lp_ctx = lp_ctx; for (i=0; handlers[i]; i++) { struct ntvfs_module_context *ntvfs; diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c index e671804ca6..68e415000e 100644 --- a/source4/ntvfs/posix/pvfs_shortname.c +++ b/source4/ntvfs/posix/pvfs_shortname.c @@ -614,7 +614,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs) } /* by default have a max of 512 entries in the cache. */ - ctx->cache_size = lp_parm_int(global_loadparm, NULL, "mangle", "cachesize", 512); + ctx->cache_size = lp_parm_int(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "cachesize", 512); ctx->prefix_cache = talloc_array(ctx, char *, ctx->cache_size); if (ctx->prefix_cache == NULL) { @@ -628,7 +628,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs) memset(ctx->prefix_cache, 0, sizeof(char *) * ctx->cache_size); memset(ctx->prefix_cache_hashes, 0, sizeof(uint32_t) * ctx->cache_size); - ctx->mangle_prefix = lp_parm_int(global_loadparm, NULL, "mangle", "prefix", -1); + ctx->mangle_prefix = lp_parm_int(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "prefix", -1); if (ctx->mangle_prefix < 0 || ctx->mangle_prefix > 6) { ctx->mangle_prefix = DEFAULT_MANGLE_PREFIX; } diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index 07948a64e2..c1e15976d2 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -216,7 +216,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs, event_context_find(pvfs), pvfs->ntvfs->ctx->config); - pvfs->sidmap = sidmap_open(pvfs, global_loadparm); + pvfs->sidmap = sidmap_open(pvfs, pvfs->ntvfs->ctx->lp_ctx); if (pvfs->sidmap == NULL) { return NT_STATUS_INTERNAL_DB_CORRUPTION; } diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index baa1d876d6..5fdb7aada6 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -83,7 +83,7 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs, p = (char *)io->ioctl.out.blob.data; SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */); - push_string(global_smb_iconv_convenience, p+2, lp_netbios_name(global_loadparm), 15, STR_TERMINATE|STR_ASCII); + push_string(global_smb_iconv_convenience, p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII); push_string(global_smb_iconv_convenience, p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c index d7b64b01f2..63889c6677 100644 --- a/source4/ntvfs/unixuid/vfs_unixuid.c +++ b/source4/ntvfs/unixuid/vfs_unixuid.c @@ -216,7 +216,7 @@ static NTSTATUS unixuid_connect(struct ntvfs_module_context *ntvfs, return NT_STATUS_NO_MEMORY; } - private->sidmap = sidmap_open(private, global_loadparm); + private->sidmap = sidmap_open(private, ntvfs->ctx->lp_ctx); if (private->sidmap == NULL) { return NT_STATUS_INTERNAL_DB_CORRUPTION; } |