summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'librpc')
-rw-r--r--librpc/idl/spoolss.idl33
-rw-r--r--librpc/ndr/ndr_spoolss_buf.c205
-rw-r--r--librpc/ndr/ndr_spoolss_buf.h4
3 files changed, 4 insertions, 238 deletions
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 6a53cb8c5c..6bf563f3c6 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1925,24 +1925,12 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
const string SPOOL_REG_URL = "url";
const string SPOOL_REG_VERSIONNUMBER = "versionNumber";
- [noopnum,noprint,public] WERROR _spoolss_GetPrinterData(
+ WERROR spoolss_GetPrinterData(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 value_name[],
- [in] uint32 offered,
[out,ref] winreg_Type *type,
- [out,ref] DATA_BLOB *data,
- [out,ref] uint32 *needed
- );
- [noopnum,noprint,public] void __spoolss_GetPrinterData(
- [in] winreg_Type type,
- [out,ref,switch_is(type)] spoolss_PrinterData *data
- );
- [nopull,nopush,public] WERROR spoolss_GetPrinterData(
- [in,ref] policy_handle *handle,
- [in] [string,charset(UTF16)] uint16 value_name[],
+ [out,ref,size_is(offered)] uint8 *data,
[in] uint32 offered,
- [out,ref] winreg_Type *type,
- [out,ref,subcontext(4),subcontext_size(offered),switch_is(*type)] spoolss_PrinterData *data,
[out,ref] uint32 *needed
);
@@ -2849,26 +2837,13 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
/******************/
/* Function: 0x4e */
- [noopnum,noprint,public] WERROR _spoolss_GetPrinterDataEx(
+ WERROR spoolss_GetPrinterDataEx(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 key_name[],
[in] [string,charset(UTF16)] uint16 value_name[],
- [in] uint32 offered,
[out,ref] winreg_Type *type,
- [out,ref] DATA_BLOB *data,
- [out,ref] uint32 *needed
- );
- [noopnum,noprint,public] void __spoolss_GetPrinterDataEx(
- [in] winreg_Type type,
- [out,ref,switch_is(type)] spoolss_PrinterData *data
- );
- [nopull,nopush,public] WERROR spoolss_GetPrinterDataEx(
- [in,ref] policy_handle *handle,
- [in] [string,charset(UTF16)] uint16 key_name[],
- [in] [string,charset(UTF16)] uint16 value_name[],
+ [out,ref,size_is(offered)] uint8 *data,
[in] uint32 offered,
- [out,ref] winreg_Type *type,
- [out,ref,subcontext(4),subcontext_size(offered),switch_is(*type)] spoolss_PrinterData *data,
[out,ref] uint32 *needed
);
diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index b20c8de353..f8a67063be 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -557,211 +557,6 @@ uint32_t ndr_size_spoolss_EnumPrinterDataEx_info(TALLOC_CTX *mem_ctx, struct smb
NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumPrinterDataEx);
}
-/*
- spoolss_GetPrinterData
-*/
-enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r)
-{
- struct _spoolss_GetPrinterData _r;
- if (flags & NDR_IN) {
- _r.in.handle = r->in.handle;
- _r.in.value_name= r->in.value_name;
- _r.in.offered = r->in.offered;
- NDR_CHECK(ndr_push__spoolss_GetPrinterData(ndr, flags, &_r));
- }
- if (flags & NDR_OUT) {
- struct ndr_push *_ndr_info;
- DATA_BLOB blob = data_blob(NULL, 0);
- _r.in.handle = r->in.handle;
- _r.in.value_name= r->in.value_name;
- _r.in.offered = r->in.offered;
- _r.out.type = r->out.type;
- _r.out.data = &blob;
- _r.out.needed = r->out.needed;
- _r.out.result = r->out.result;
- {
- struct __spoolss_GetPrinterData __r;
- DATA_BLOB _blob;
- _ndr_info = ndr_push_init_ctx(ndr, ndr->iconv_convenience);
- NDR_ERR_HAVE_NO_MEMORY(_ndr_info);
- _ndr_info->flags= ndr->flags;
- __r.in.type = *r->out.type;
- __r.out.data = r->out.data;
- NDR_CHECK(ndr_push___spoolss_GetPrinterData(_ndr_info, flags, &__r));
- if (r->in.offered > _ndr_info->offset) {
- uint32_t _padding_len = r->in.offered - _ndr_info->offset;
- NDR_CHECK(ndr_push_zero(_ndr_info, _padding_len));
- }
- _blob = ndr_push_blob(_ndr_info);
- _r.out.data = &_blob;
- }
- NDR_CHECK(ndr_push__spoolss_GetPrinterData(ndr, flags, &_r));
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterData *r)
-{
- struct _spoolss_GetPrinterData _r;
- if (flags & NDR_IN) {
- DATA_BLOB blob = data_blob(NULL,0);
- ZERO_STRUCT(r->out);
-
- _r.in.handle = r->in.handle;
- _r.in.value_name= r->in.value_name;
- _r.in.offered = r->in.offered;
- _r.out.type = r->out.type;
- _r.out.data = &blob;
- _r.out.needed = r->out.needed;
- NDR_CHECK(ndr_pull__spoolss_GetPrinterData(ndr, flags, &_r));
- r->in.handle = _r.in.handle;
- r->in.value_name= _r.in.value_name;
- r->in.offered = _r.in.offered;
- r->out.needed = _r.out.needed;
- }
- if (flags & NDR_OUT) {
- DATA_BLOB blob = data_blob_talloc(ndr,NULL,0);
- _r.in.handle = r->in.handle;
- _r.in.value_name= r->in.value_name;
- _r.in.offered = r->in.offered;
- _r.out.type = r->out.type;
- _r.out.data = &blob;
- _r.out.needed = r->out.needed;
- _r.out.result = r->out.result;
- NDR_CHECK(ndr_pull__spoolss_GetPrinterData(ndr, flags, &_r));
- r->out.type = _r.out.type;
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.data);
- }
- ZERO_STRUCTP(r->out.data);
- r->out.needed = _r.out.needed;
- r->out.result = _r.out.result;
- if (_r.out.data && _r.out.data->length != r->in.offered) {
- return ndr_pull_error(ndr, NDR_ERR_BUFSIZE,
- "SPOOLSS Buffer: r->in.offered[%u] doesn't match length of out buffer[%u]",
- (unsigned)r->in.offered, (unsigned)_r.out.data->length);
- }
- if (_r.out.data && _r.out.data->length > 0 && *r->out.needed <= _r.out.data->length) {
- struct __spoolss_GetPrinterData __r;
- struct ndr_pull *_ndr_data = ndr_pull_init_blob(_r.out.data, ndr, ndr->iconv_convenience);
- NDR_ERR_HAVE_NO_MEMORY(_ndr_data);
- _ndr_data->flags= ndr->flags;
- __r.in.type = *r->out.type;
- __r.out.data = r->out.data;
- NDR_CHECK(ndr_pull___spoolss_GetPrinterData(_ndr_data, flags, &__r));
- r->out.data = __r.out.data;
- } else {
- *r->out.type = REG_NONE;
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-/*
- spoolss_GetPrinterDataEx
-*/
-enum ndr_err_code ndr_push_spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDataEx *r)
-{
- struct _spoolss_GetPrinterDataEx _r;
- if (flags & NDR_IN) {
- _r.in.handle = r->in.handle;
- _r.in.key_name = r->in.key_name;
- _r.in.value_name= r->in.value_name;
- _r.in.offered = r->in.offered;
- NDR_CHECK(ndr_push__spoolss_GetPrinterDataEx(ndr, flags, &_r));
- }
- if (flags & NDR_OUT) {
- struct ndr_push *_ndr_info;
- DATA_BLOB blob = data_blob(NULL, 0);
- _r.in.handle = r->in.handle;
- _r.in.key_name = r->in.key_name;
- _r.in.value_name= r->in.value_name;
- _r.in.offered = r->in.offered;
- _r.out.type = r->out.type;
- _r.out.data = &blob;
- _r.out.needed = r->out.needed;
- _r.out.result = r->out.result;
- {
- struct __spoolss_GetPrinterDataEx __r;
- DATA_BLOB _blob;
- _ndr_info = ndr_push_init_ctx(ndr, ndr->iconv_convenience);
- NDR_ERR_HAVE_NO_MEMORY(_ndr_info);
- _ndr_info->flags= ndr->flags;
- __r.in.type = *r->out.type;
- __r.out.data = r->out.data;
- NDR_CHECK(ndr_push___spoolss_GetPrinterDataEx(_ndr_info, flags, &__r));
- if (r->in.offered > _ndr_info->offset) {
- uint32_t _padding_len = r->in.offered - _ndr_info->offset;
- NDR_CHECK(ndr_push_zero(_ndr_info, _padding_len));
- }
- _blob = ndr_push_blob(_ndr_info);
- _r.out.data = &_blob;
- }
- NDR_CHECK(ndr_push__spoolss_GetPrinterDataEx(ndr, flags, &_r));
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDataEx *r)
-{
- struct _spoolss_GetPrinterDataEx _r;
- if (flags & NDR_IN) {
- DATA_BLOB blob = data_blob(NULL,0);
- ZERO_STRUCT(r->out);
-
- _r.in.handle = r->in.handle;
- _r.in.key_name = r->in.key_name;
- _r.in.value_name= r->in.value_name;
- _r.in.offered = r->in.offered;
- _r.out.type = r->out.type;
- _r.out.data = &blob;
- _r.out.needed = r->out.needed;
- NDR_CHECK(ndr_pull__spoolss_GetPrinterDataEx(ndr, flags, &_r));
- r->in.handle = _r.in.handle;
- r->in.key_name = _r.in.key_name;
- r->in.value_name= _r.in.value_name;
- r->in.offered = _r.in.offered;
- r->out.needed = _r.out.needed;
- }
- if (flags & NDR_OUT) {
- DATA_BLOB blob = data_blob_talloc(ndr,NULL,0);
- _r.in.handle = r->in.handle;
- _r.in.key_name = r->in.key_name;
- _r.in.value_name= r->in.value_name;
- _r.in.offered = r->in.offered;
- _r.out.type = r->out.type;
- _r.out.data = &blob;
- _r.out.needed = r->out.needed;
- _r.out.result = r->out.result;
- NDR_CHECK(ndr_pull__spoolss_GetPrinterDataEx(ndr, flags, &_r));
- r->out.type = _r.out.type;
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.data);
- }
- ZERO_STRUCTP(r->out.data);
- r->out.needed = _r.out.needed;
- r->out.result = _r.out.result;
- if (_r.out.data && _r.out.data->length != r->in.offered) {
- return ndr_pull_error(ndr, NDR_ERR_BUFSIZE,
- "SPOOLSS Buffer: r->in.offered[%u] doesn't match length of out buffer[%u]",
- (unsigned)r->in.offered, (unsigned)_r.out.data->length);
- }
- if (_r.out.data && _r.out.data->length > 0 && *r->out.needed <= _r.out.data->length) {
- struct __spoolss_GetPrinterDataEx __r;
- struct ndr_pull *_ndr_data = ndr_pull_init_blob(_r.out.data, ndr, ndr->iconv_convenience);
- NDR_ERR_HAVE_NO_MEMORY(_ndr_data);
- _ndr_data->flags= ndr->flags;
- __r.in.type = *r->out.type;
- __r.out.data = r->out.data;
- NDR_CHECK(ndr_pull___spoolss_GetPrinterDataEx(_ndr_data, flags, &__r));
- r->out.data = __r.out.data;
- } else {
- *r->out.type = REG_NONE;
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags)
{
if (!devmode) return 0;
diff --git a/librpc/ndr/ndr_spoolss_buf.h b/librpc/ndr/ndr_spoolss_buf.h
index fa22cdfce7..2766abb1cd 100644
--- a/librpc/ndr/ndr_spoolss_buf.h
+++ b/librpc/ndr/ndr_spoolss_buf.h
@@ -42,10 +42,6 @@ enum ndr_err_code ndr_push_spoolss_EnumPrinterDataEx(struct ndr_push *ndr, int f
enum ndr_err_code ndr_pull_spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinterDataEx *r);
uint32_t ndr_size_spoolss_EnumPrinterDataEx_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
uint32_t count, struct spoolss_PrinterEnumValues *info);
-enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r);
-enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterData *r);
-enum ndr_err_code ndr_push_spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDataEx *r);
-enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDataEx *r);
uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags);
size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, struct smb_iconv_convenience *ic, int flags);
_PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo101 *r);