1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-01 16:23:49 +03:00

r26431: Require ndr_push creators to specify a iconv_convenience context.

This commit is contained in:
Jelmer Vernooij
2007-12-13 22:46:23 +01:00
committed by Stefan Metzmacher
parent 1b947fe0e6
commit 7352206f44
19 changed files with 50 additions and 41 deletions

View File

@@ -35,6 +35,7 @@
#include "ntvfs/common/ntvfs_common.h"
#include "ntvfs/sysdep/sys_notify.h"
#include "cluster/cluster.h"
#include "param/param.h"
struct notify_context {
struct tdb_wrap *w;
@@ -95,7 +96,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
return NULL;
}
notify->w = cluster_tdb_tmp_open(notify, "notify.tdb", TDB_SEQNUM);
notify->w = cluster_tdb_tmp_open(notify, global_loadparm, "notify.tdb", TDB_SEQNUM);
if (notify->w == NULL) {
talloc_free(notify);
return NULL;

View File

@@ -79,7 +79,7 @@ static struct odb_context *odb_tdb_init(TALLOC_CTX *mem_ctx,
return NULL;
}
odb->w = cluster_tdb_tmp_open(odb, "openfiles.tdb", TDB_DEFAULT);
odb->w = cluster_tdb_tmp_open(odb, ntvfs_ctx->lp_ctx, "openfiles.tdb", TDB_DEFAULT);
if (odb->w == NULL) {
talloc_free(odb);
return NULL;

View File

@@ -23,6 +23,7 @@
#include "libcli/rap/rap.h"
#include "ntvfs/ipc/proto.h"
#include "librpc/ndr/libndr.h"
#include "param/param.h"
#define NDR_RETURN(call) do { \
enum ndr_err_code _ndr_err; \
@@ -444,8 +445,8 @@ NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct smb_trans2 *trans)
NDR_RETURN(ndr_pull_string(call->ndr_pull_param, NDR_SCALARS,
&call->datadesc));
call->ndr_push_param = ndr_push_init_ctx(call);
call->ndr_push_data = ndr_push_init_ctx(call);
call->ndr_push_param = ndr_push_init_ctx(call, lp_iconv_convenience(global_loadparm));
call->ndr_push_data = ndr_push_init_ctx(call, lp_iconv_convenience(global_loadparm));
if ((call->ndr_push_param == NULL) || (call->ndr_push_data == NULL))
return NT_STATUS_NO_MEMORY;
@@ -470,8 +471,8 @@ NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct smb_trans2 *trans)
result_param = ndr_push_blob(call->ndr_push_param);
result_data = ndr_push_blob(call->ndr_push_data);
final_param = ndr_push_init_ctx(call);
final_data = ndr_push_init_ctx(call);
final_param = ndr_push_init_ctx(call, lp_iconv_convenience(global_loadparm));
final_data = ndr_push_init_ctx(call, lp_iconv_convenience(global_loadparm));
if ((final_param == NULL) || (final_data == NULL))
return NT_STATUS_NO_MEMORY;