summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-22 08:11:32 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-22 08:11:32 +0000
commit86a604429ee13aa8c3f930ea74b1fada278ced45 (patch)
tree5d2699e261de3b8cd8d84983f54e4032cb4eb4c2 /source4/torture
parent595002026669ec81e3e71f98e9a12adfd353751f (diff)
downloadsamba-86a604429ee13aa8c3f930ea74b1fada278ced45.tar.gz
samba-86a604429ee13aa8c3f930ea74b1fada278ced45.tar.bz2
samba-86a604429ee13aa8c3f930ea74b1fada278ced45.zip
a fairly major upgrade to the dcerpc system
* added a NDR validator. The way it works is that when the DCERPC_DEBUG_VALIDATE_* flags are set the dcerpc system will perform NDR buffer validation. On sending a request the packet is first marshalled, then unmarahslled, then marshalled again, and it is confirmed that the two marshalling results are idential. This ensures that our pull and push routines are absolutely in sync, so that we can be very confident that if a routine works in the client then the corresponding routine must work on the server side. A similar validation is performed on all replies. * a result of this change is that pidl is fussier about the [ref] tag. You can only use it on pointers (which is the only place it makes sense) * fixed a basic alignment bug in the push side of the NDR code * added server side pull/push support. Our dcerpc system is now fully ready to be used on the server side. * fixed the relative offset pointer list. It must be traversed in reverse order on push * added automatic value setting for the size parameter in outgoing SdBuf structures. * expanded the ndr debugging code to always give a message on any failure * fixed the subcontext push code * fixed some memory leaks in smbtorture RPC tests (This used to be commit 8ecf720206a2eef3f8ea7cbdb1f460664a5dba9a)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/atsvc.c2
-rw-r--r--source4/torture/rpc/dfs.c2
-rw-r--r--source4/torture/rpc/echo.c2
-rw-r--r--source4/torture/rpc/epmapper.c2
-rw-r--r--source4/torture/rpc/eventlog.c2
-rw-r--r--source4/torture/rpc/lsa.c4
-rw-r--r--source4/torture/rpc/samr.c6
-rw-r--r--source4/torture/rpc/spoolss.c2
-rw-r--r--source4/torture/rpc/srvsvc.c2
-rw-r--r--source4/torture/rpc/winreg.c2
-rw-r--r--source4/torture/rpc/wkssvc.c2
11 files changed, 24 insertions, 4 deletions
diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c
index 8dfadb1c16..7d0ac42fa4 100644
--- a/source4/torture/rpc/atsvc.c
+++ b/source4/torture/rpc/atsvc.c
@@ -159,6 +159,8 @@ BOOL torture_rpc_atsvc(int dummy)
return False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index abd78a8cd0..7b20e044bb 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -196,6 +196,8 @@ BOOL torture_rpc_dfs(int dummy)
ret = False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 8d8a3d7c0c..4ac57e7b6e 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -254,6 +254,8 @@ BOOL torture_rpc_echo(int dummy)
printf("\n");
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
}
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index f00d52f1a5..7893813f56 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -88,6 +88,8 @@ BOOL torture_rpc_epmapper(int dummy)
ret = False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 14b091a0c3..19f0644258 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -101,6 +101,8 @@ BOOL torture_rpc_eventlog(int dummy)
return False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 35b4ff3333..9512493181 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -539,7 +539,7 @@ BOOL torture_rpc_lsa(int dummy)
return False;
}
- p->flags |= DCERPC_DEBUG_PRINT_BOTH;
+ p->flags |= DCERPC_DEBUG_PRINT_BOTH | DCERPC_DEBUG_VALIDATE_BOTH;
if (!test_OpenPolicy(p, mem_ctx)) {
ret = False;
@@ -575,6 +575,8 @@ BOOL torture_rpc_lsa(int dummy)
ret = False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index d825ddb02c..ef7d9300d8 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -823,7 +823,6 @@ static BOOL test_EnumDomains(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_EnumDomains r;
uint32 resume_handle = 0;
- uint32 num_entries=0;
int i;
BOOL ret = True;
@@ -831,7 +830,6 @@ static BOOL test_EnumDomains(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.resume_handle = &resume_handle;
r.in.buf_size = (uint32)-1;
r.out.resume_handle = &resume_handle;
- r.out.num_entries = &num_entries;
status = dcerpc_samr_EnumDomains(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -904,7 +902,7 @@ BOOL torture_rpc_samr(int dummy)
return False;
}
- p->flags |= DCERPC_DEBUG_PRINT_BOTH;
+ p->flags |= DCERPC_DEBUG_PRINT_BOTH | DCERPC_DEBUG_VALIDATE_BOTH;
if (!test_Connect(p, mem_ctx, &handle)) {
ret = False;
@@ -922,6 +920,8 @@ BOOL torture_rpc_samr(int dummy)
ret = False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 6b208329e3..6c85a78d20 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -325,6 +325,8 @@ BOOL torture_rpc_spoolss(int dummy)
ret = False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 1f93357907..65dc63ff54 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -287,6 +287,8 @@ BOOL torture_rpc_srvsvc(int dummy)
ret = False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 7ca63f722e..3b88b032b7 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -385,6 +385,8 @@ BOOL torture_rpc_winreg(int dummy)
}
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index ed1f5d4400..6b09565bda 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -104,6 +104,8 @@ BOOL torture_rpc_wkssvc(int dummy)
ret = False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;