summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/make/rules.mk6
-rw-r--r--source4/librpc/idl/winsrepl.idl2
-rw-r--r--source4/librpc/ndr/ndr_spoolss_buf.c4
-rw-r--r--source4/librpc/rpc/dcerpc.c2
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c32
5 files changed, 28 insertions, 18 deletions
diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk
index 6898432963..55ecf8968b 100644
--- a/source4/build/make/rules.mk
+++ b/source4/build/make/rules.mk
@@ -182,8 +182,10 @@ showflags::
@echo ' MDLD_FLAGS = $(MDLD_FLAGS)'
@echo ' SHLIBEXT = $(SHLIBEXT)'
+base_srcdirs = $(srcdir) ../librpc/ ../lib/ ../libcli
+
etags:
- etags `find $(srcdir) -name "*.[ch]"`
+ etags `find $(base_srcdirs) -name "*.[ch]"`
ctags:
- ctags `find $(srcdir) -name "*.[ch]"`
+ ctags `find $(base_srcdirs) -name "*.[ch]"`
diff --git a/source4/librpc/idl/winsrepl.idl b/source4/librpc/idl/winsrepl.idl
index 13432d86f6..0ec05e891c 100644
--- a/source4/librpc/idl/winsrepl.idl
+++ b/source4/librpc/idl/winsrepl.idl
@@ -164,7 +164,7 @@ interface wrepl
} wrepl_packet;
typedef [flag(NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {
- [value(ndr_size_wrepl_packet(&packet, ndr->flags))] uint32 size;
+ [value(ndr_size_wrepl_packet(&packet, ndr->iconv_convenience, ndr->flags))] uint32 size;
wrepl_packet packet;
} wrepl_wrap;
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c
index f42e3678b0..335275f680 100644
--- a/source4/librpc/ndr/ndr_spoolss_buf.c
+++ b/source4/librpc/ndr/ndr_spoolss_buf.c
@@ -525,8 +525,8 @@ enum ndr_err_code ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flag
return NDR_ERR_SUCCESS;
}
-uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, uint32_t flags)
+uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags)
{
if (!devmode) return 0;
- return ndr_size_spoolss_DeviceMode(devmode,flags);
+ return ndr_size_spoolss_DeviceMode(devmode,ic,flags);
}
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index a5b17f0405..45c4e78cf1 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -1051,7 +1051,7 @@ static void dcerpc_ship_next_request(struct dcerpc_connection *c)
if (req->object) {
pkt.u.request.object.object = *req->object;
pkt.pfc_flags |= DCERPC_PFC_FLAG_OBJECT_UUID;
- chunk_size -= ndr_size_GUID(req->object,0);
+ chunk_size -= ndr_size_GUID(req->object,NULL,0);
}
/* we send a series of pdus without waiting for a reply */
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index a183ccb9f0..d041d79b3e 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -35,11 +35,11 @@ enum spoolss_handle {
SPOOLSS_NOTIFY
};
-#define SPOOLSS_BUFFER_UNION(fn,info,level) \
- ((info)?ndr_size_##fn(info, level, 0):0)
+#define SPOOLSS_BUFFER_UNION(fn,ic,info,level) \
+ ((info)?ndr_size_##fn(info, level, ic, 0):0)
-#define SPOOLSS_BUFFER_UNION_ARRAY(fn,info,level,count) \
- ((info)?ndr_size_##fn##_info(dce_call, lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx), level, count, info):0)
+#define SPOOLSS_BUFFER_UNION_ARRAY(fn,ic,info,level,count) \
+ ((info)?ndr_size_##fn##_info(dce_call, ic, level, count, info):0)
#define SPOOLSS_BUFFER_OK(val_true,val_false) ((r->in.offered >= r->out.needed)?val_true:val_false)
@@ -235,6 +235,7 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
WERROR status;
+ struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -242,7 +243,7 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumPrinters(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, r->out.info, r->in.level, r->out.count);
+ r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, ic, r->out.info, r->in.level, r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -370,6 +371,7 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
WERROR status;
+ struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -377,7 +379,7 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
status = ntptr_EnumPrinterDrivers(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, r->out.info, r->in.level, r->out.count);
+ r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, ic, r->out.info, r->in.level, r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -402,6 +404,7 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
WERROR status;
+ struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.server);
W_ERROR_NOT_OK_RETURN(status);
@@ -409,7 +412,7 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
status = ntptr_GetPrinterDriverDirectory(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, r->out.info, r->in.level);
+ r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, ic, r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -554,6 +557,7 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
struct ntptr_GenericHandle *handle;
struct dcesrv_handle *h;
WERROR status;
+ struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -571,7 +575,7 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
W_ERROR_NOT_OK_RETURN(status);
- r->out.needed = ndr_size_spoolss_PrinterData(&r->out.data, r->out.type, 0);
+ r->out.needed = ndr_size_spoolss_PrinterData(&r->out.data, r->out.type, ic, 0);
r->out.type = SPOOLSS_BUFFER_OK(r->out.type, SPOOLSS_PRINTER_DATA_TYPE_NULL);
r->out.data = SPOOLSS_BUFFER_OK(r->out.data, r->out.data);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_MORE_DATA);
@@ -691,6 +695,7 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
struct ntptr_GenericHandle *handle;
struct dcesrv_handle *h;
WERROR status;
+ struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -711,7 +716,7 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_FOOBAR;
}
- r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, r->out.info, r->in.level);
+ r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, ic, r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -758,6 +763,7 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
struct ntptr_GenericHandle *handle;
struct dcesrv_handle *h;
WERROR status;
+ struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
@@ -777,7 +783,7 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
return WERR_FOOBAR;
}
- r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, r->out.info, r->in.level, r->out.count);
+ r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, ic, r->out.info, r->in.level, r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -792,6 +798,7 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
WERROR status;
+ struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.servername);
W_ERROR_NOT_OK_RETURN(status);
@@ -799,7 +806,7 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
status = ntptr_EnumPorts(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, r->out.info, r->in.level, r->out.count);
+ r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, ic, r->out.info, r->in.level, r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -814,6 +821,7 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
{
struct ntptr_context *ntptr = talloc_get_type(dce_call->context->private, struct ntptr_context);
WERROR status;
+ struct smb_iconv_convenience *ic = lp_iconv_convenience(ntptr->lp_ctx);
status = dcesrv_spoolss_check_server_name(dce_call, mem_ctx, r->in.servername);
W_ERROR_NOT_OK_RETURN(status);
@@ -821,7 +829,7 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumMonitors(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, r->out.info, r->in.level, r->out.count);
+ r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, ic, r->out.info, r->in.level, r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);