summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-22 10:37:00 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-22 10:37:00 +0000
commit677fb26deba2e8b8965c41d7b7455063db031a2c (patch)
treed445c5d5be9d6365373606d1dada66acc432ecf1
parent0b0ca9f75429e16b4ab3114cc38e16d0f9d9fa62 (diff)
downloadsamba-677fb26deba2e8b8965c41d7b7455063db031a2c.tar.gz
samba-677fb26deba2e8b8965c41d7b7455063db031a2c.tar.bz2
samba-677fb26deba2e8b8965c41d7b7455063db031a2c.zip
* fixed handling of relative subcontext unions
* fixed GetPrinter in spoolss after OpenPrinter (This used to be commit 4aea2d79dd6b14e0fdfafd2236849ece01839ce0)
-rw-r--r--source4/build/pidl/parser.pm4
-rw-r--r--source4/librpc/idl/spoolss.idl38
-rw-r--r--source4/torture/rpc/spoolss.c4
3 files changed, 23 insertions, 23 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index e12650dea2..df05d7fdba 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -350,7 +350,7 @@ sub ParseElementPushScalar($$$)
ParseElementPushSwitch($e, $var_prefix, $ndr_flags, $switch);
} elsif (defined $sub_size) {
if (util::is_builtin_type($e->{TYPE})) {
- pidl "\tNDR_CHECK(ndr_push_subcontext_fn(ndr, $sub_size, $cprefix$var_prefix$e->{NAME}, (ndr_push_fn_t) ndr_pull_$e->{TYPE}));\n";
+ pidl "\tNDR_CHECK(ndr_push_subcontext_fn(ndr, $sub_size, $cprefix$var_prefix$e->{NAME}, (ndr_push_fn_t) ndr_push_$e->{TYPE}));\n";
} else {
pidl "\tNDR_CHECK(ndr_push_subcontext_flags_fn(ndr, $sub_size, $cprefix$var_prefix$e->{NAME}, (ndr_push_flags_fn_t) ndr_push_$e->{TYPE}));\n";
}
@@ -440,7 +440,7 @@ sub ParseElementPushSwitch($$$$)
my $sub_size = util::has_property($e, "subcontext");
if (defined $sub_size) {
- pidl "\tNDR_CHECK(ndr_push_subcontext_union_fn(ndr, $sub_size, $switch_var, $cprefix$var_prefix$e->{NAME}, (ndr_push_union_fn_t) ndr_pull_$e->{TYPE}));\n";
+ pidl "\tNDR_CHECK(ndr_push_subcontext_union_fn(ndr, $sub_size, $switch_var, $cprefix$var_prefix$e->{NAME}, (ndr_push_union_fn_t) ndr_push_$e->{TYPE}));\n";
} else {
pidl "\tNDR_CHECK(ndr_push_$e->{TYPE}(ndr, $ndr_flags, $switch_var, $cprefix$var_prefix$e->{NAME}));\n";
}
diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl
index a9d653458b..df8833d2d8 100644
--- a/source4/librpc/idl/spoolss.idl
+++ b/source4/librpc/idl/spoolss.idl
@@ -52,24 +52,24 @@
typedef struct {
uint32 flags;
- [relative] nstring name;
- [relative] nstring description;
- [relative] nstring comment;
+ [relative] nstring *name;
+ [relative] nstring *description;
+ [relative] nstring *comment;
} spoolss_PrinterInfo1;
typedef struct {
- [relative] nstring servername;
- [relative] nstring printername;
- [relative] nstring sharename;
- [relative] nstring portname;
- [relative] nstring drivername;
- [relative] nstring comment;
- [relative] nstring location;
+ [relative] nstring *servername;
+ [relative] nstring *printername;
+ [relative] nstring *sharename;
+ [relative] nstring *portname;
+ [relative] nstring *drivername;
+ [relative] nstring *comment;
+ [relative] nstring *location;
[relative] spoolss_DeviceMode *devmode;
- [relative] nstring sepfile;
- [relative] nstring printprocessor;
- [relative] nstring datatype;
- [relative] nstring parameters;
+ [relative] nstring *sepfile;
+ [relative] nstring *printprocessor;
+ [relative] nstring *datatype;
+ [relative] nstring *parameters;
[relative] security_descriptor *secdesc;
uint32 attributes;
uint32 priority;
@@ -87,14 +87,14 @@
} spoolss_PrinterInfo3;
typedef struct {
- [relative] nstring printername;
- [relative] nstring servername;
+ [relative] nstring *printername;
+ [relative] nstring *servername;
uint32 attributes;
} spoolss_PrinterInfo4;
typedef struct {
- [relative] nstring printername;
- [relative] nstring portname;
+ [relative] nstring *printername;
+ [relative] nstring *portname;
uint32 attributes;
uint32 device_not_selected_timeout;
uint32 transmission_retry_timeout;
@@ -105,7 +105,7 @@
} spoolss_PrinterInfo6;
typedef struct {
- [relative] nstring guid; /* text form of printer guid */
+ [relative] nstring *guid; /* text form of printer guid */
uint32 action;
} spoolss_PrinterInfo7;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 6c85a78d20..813bcdd6aa 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -139,13 +139,13 @@ static BOOL test_OpenPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
blob = data_blob(NULL, 0);
- r.in.server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
+ r.in.server = talloc_asprintf(mem_ctx, "\\\\%s\\%s", dcerpc_server_name(p), name);
r.in.printer = NULL;
r.in.buffer = &blob;
r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
r.out.handle = &handle;
- printf("\nTesting OpenPrinter(\\\\%s\\%s)\n", r.in.server, r.in.printer);
+ printf("\nTesting OpenPrinter(\\\\%s)\n", r.in.server);
status = dcerpc_spoolss_OpenPrinter(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {