diff options
author | Günther Deschner <gd@samba.org> | 2010-03-04 15:38:18 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-03-05 15:17:59 +0100 |
commit | 0e779b573bf5c27bf08ceefa09a7e2b07691f948 (patch) | |
tree | 377cefb23c3f61e796a44d569ace5be2e0f85c9e /librpc/ndr | |
parent | ca319bfff2f2e73fb83587d032fd78553314eae0 (diff) | |
download | samba-0e779b573bf5c27bf08ceefa09a7e2b07691f948.tar.gz samba-0e779b573bf5c27bf08ceefa09a7e2b07691f948.tar.bz2 samba-0e779b573bf5c27bf08ceefa09a7e2b07691f948.zip |
spoolss: rollback GetPrinterData[Ex] IDL.
Guenther
Diffstat (limited to 'librpc/ndr')
-rw-r--r-- | librpc/ndr/ndr_spoolss_buf.c | 205 | ||||
-rw-r--r-- | librpc/ndr/ndr_spoolss_buf.h | 4 |
2 files changed, 0 insertions, 209 deletions
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); |