1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

spoolss: fix spoolss_DriverInfo8 IDL.

found by RPC-SPOOLSS torture teset.

Guenther
This commit is contained in:
Günther Deschner 2009-12-07 18:55:08 +01:00
parent 5e8e5dfe88
commit 1b6c444557
3 changed files with 55 additions and 55 deletions

View File

@ -13191,6 +13191,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo8(struct ndr_push *ndr, in
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
ndr->flags = _flags_save_string;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
ndr->flags = _flags_save_string_array;
}
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
@ -13203,12 +13209,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo8(struct ndr_push *ndr, in
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
ndr->flags = _flags_save_string;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
ndr->flags = _flags_save_string_array;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
@ -13331,6 +13331,15 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo8(struct ndr_push *ndr, in
}
ndr->flags = _flags_save_string;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->dependent_files) {
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dependent_files));
NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
}
ndr->flags = _flags_save_string_array;
}
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
@ -13349,15 +13358,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo8(struct ndr_push *ndr, in
}
ndr->flags = _flags_save_string;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->dependent_files) {
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dependent_files));
NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
}
ndr->flags = _flags_save_string_array;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
@ -13466,12 +13466,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo8(struct ndr_pull *ndr, in
TALLOC_CTX *_mem_save_config_file_0;
uint32_t _ptr_help_file;
TALLOC_CTX *_mem_save_help_file_0;
uint32_t _ptr_dependent_files;
TALLOC_CTX *_mem_save_dependent_files_0;
uint32_t _ptr_monitor_name;
TALLOC_CTX *_mem_save_monitor_name_0;
uint32_t _ptr_default_datatype;
TALLOC_CTX *_mem_save_default_datatype_0;
uint32_t _ptr_dependent_files;
TALLOC_CTX *_mem_save_dependent_files_0;
uint32_t _ptr_previous_names;
TALLOC_CTX *_mem_save_previous_names_0;
uint32_t _ptr_manufacturer_name;
@ -13567,6 +13567,18 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo8(struct ndr_pull *ndr, in
}
ndr->flags = _flags_save_string;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
if (_ptr_dependent_files) {
NDR_PULL_ALLOC(ndr, r->dependent_files);
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
} else {
r->dependent_files = NULL;
}
ndr->flags = _flags_save_string_array;
}
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
@ -13591,18 +13603,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo8(struct ndr_pull *ndr, in
}
ndr->flags = _flags_save_string;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
if (_ptr_dependent_files) {
NDR_PULL_ALLOC(ndr, r->dependent_files);
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
} else {
r->dependent_files = NULL;
}
ndr->flags = _flags_save_string_array;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
@ -13839,6 +13839,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo8(struct ndr_pull *ndr, in
}
ndr->flags = _flags_save_string;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->dependent_files) {
uint32_t _relative_save_offset;
_relative_save_offset = ndr->offset;
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
_mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
if (ndr->offset > ndr->relative_highest_offset) {
ndr->relative_highest_offset = ndr->offset;
}
ndr->offset = _relative_save_offset;
}
ndr->flags = _flags_save_string_array;
}
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
@ -13875,24 +13893,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo8(struct ndr_pull *ndr, in
}
ndr->flags = _flags_save_string;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->dependent_files) {
uint32_t _relative_save_offset;
_relative_save_offset = ndr->offset;
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
_mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
if (ndr->offset > ndr->relative_highest_offset) {
ndr->relative_highest_offset = ndr->offset;
}
ndr->offset = _relative_save_offset;
}
ndr->flags = _flags_save_string_array;
}
{
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
@ -14118,6 +14118,12 @@ _PUBLIC_ void ndr_print_spoolss_DriverInfo8(struct ndr_print *ndr, const char *n
ndr_print_string(ndr, "help_file", r->help_file);
}
ndr->depth--;
ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
ndr->depth++;
if (r->dependent_files) {
ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
}
ndr->depth--;
ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
ndr->depth++;
if (r->monitor_name) {
@ -14130,12 +14136,6 @@ _PUBLIC_ void ndr_print_spoolss_DriverInfo8(struct ndr_print *ndr, const char *n
ndr_print_string(ndr, "default_datatype", r->default_datatype);
}
ndr->depth--;
ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
ndr->depth++;
if (r->dependent_files) {
ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
}
ndr->depth--;
ndr_print_ptr(ndr, "previous_names", r->previous_names);
ndr->depth++;
if (r->previous_names) {

View File

@ -1434,9 +1434,9 @@ struct spoolss_DriverInfo8 {
const char * data_file;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char * config_file;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char * help_file;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char ** dependent_files;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char * monitor_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char * default_datatype;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char ** dependent_files;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char ** previous_names;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
NTTIME driver_date;
uint64_t driver_version;

View File

@ -1204,9 +1204,9 @@ import "misc.idl", "security.idl", "winreg.idl";
[relative] nstring *data_file;
[relative] nstring *config_file;
[relative] nstring *help_file;
[relative] nstring_array *dependent_files;
[relative] nstring *monitor_name;
[relative] nstring *default_datatype;
[relative] nstring_array *dependent_files;
[relative] nstring_array *previous_names;
NTTIME driver_date;
hyper driver_version;