mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Fix syntax errors.
This commit is contained in:
parent
08259c1c52
commit
ce47b69d8e
@ -283,7 +283,7 @@ import "misc.idl", "security.idl", "winreg.idl";
|
||||
/******************/
|
||||
/* Function: 0x01 */
|
||||
typedef struct {
|
||||
[value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size;
|
||||
[value(_ndr_size_spoolss_DeviceMode(devmode, ndr->iconv_convenience, ndr->flags))] uint32 _ndr_size;
|
||||
[subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
|
||||
} spoolss_DevmodeContainer;
|
||||
|
||||
@ -726,7 +726,7 @@ import "misc.idl", "security.idl", "winreg.idl";
|
||||
const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86";
|
||||
|
||||
typedef [public,gensize] struct {
|
||||
[value(ndr_size_spoolss_OSVersion(r,ndr->flags))] uint32 _ndr_size;
|
||||
[value(ndr_size_spoolss_OSVersion(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
|
||||
uint32 major;
|
||||
uint32 minor;
|
||||
uint32 build;
|
||||
@ -735,7 +735,7 @@ import "misc.idl", "security.idl", "winreg.idl";
|
||||
} spoolss_OSVersion;
|
||||
|
||||
typedef [public,gensize] struct {
|
||||
[value(ndr_size_spoolss_OSVersionEx(r,ndr->flags))] uint32 _ndr_size;
|
||||
[value(ndr_size_spoolss_OSVersionEx(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
|
||||
uint32 major;
|
||||
uint32 minor;
|
||||
uint32 build;
|
||||
@ -801,7 +801,7 @@ import "misc.idl", "security.idl", "winreg.idl";
|
||||
[in] [string,charset(UTF16)] uint16 value_name[],
|
||||
[in] spoolss_PrinterDataType type,
|
||||
[in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
|
||||
[in,value(ndr_size_spoolss_PrinterData(&data,type,flags))] uint32 _offered
|
||||
[in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
|
||||
);
|
||||
|
||||
/******************/
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user