summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-09-10 22:06:49 +0000
committerSimo Sorce <idra@samba.org>2006-09-10 22:06:49 +0000
commit92d75e519c63cbbad7b8b3c28d5948a73f12df12 (patch)
tree5fea43c747e216cae5b3b3f0a21031692f62507c
parent313c81352e306c9f2c19f3172911099b56edb817 (diff)
downloadsamba-92d75e519c63cbbad7b8b3c28d5948a73f12df12.tar.gz
samba-92d75e519c63cbbad7b8b3c28d5948a73f12df12.tar.xz
samba-92d75e519c63cbbad7b8b3c28d5948a73f12df12.zip
r18345: test also flags
-rw-r--r--source/torture/rpc/srvsvc.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/torture/rpc/srvsvc.c b/source/torture/rpc/srvsvc.c
index 78bde03dede..492f21e9bf2 100644
--- a/source/torture/rpc/srvsvc.c
+++ b/source/torture/rpc/srvsvc.c
@@ -786,6 +786,7 @@ static BOOL test_NetNameValidate(struct dcerpc_pipe *p,
/* valid path types only between 1 and 13 */
for (i = 1; i < 14; i++) {
+again:
/* Find maximum length accepted by this type */
r.in.name_type = i;
r.in.name = talloc_strdup(mem_ctx, "A");
@@ -809,7 +810,7 @@ static BOOL test_NetNameValidate(struct dcerpc_pipe *p,
talloc_free(r.in.name);
- printf("Maximum length for type %d: %d\n", i, n);
+ printf("Maximum length for type %2d, flags %08x: %d\n", i, r.in.flags, n);
/* find invalid chars for this type check only ASCII between 0x20 and 0x7e */
@@ -832,7 +833,15 @@ static BOOL test_NetNameValidate(struct dcerpc_pipe *p,
talloc_free(r.in.name);
}
- printf("Invalid chars for type %d: %s\n", i, invalidc);
+ printf(" Invalid chars for type %2d, flags %08x: \"%s\"\n", i, r.in.flags, invalidc);
+
+ /* only two values are accepted for flags: 0x0 and 0x80000000 */
+ if (r.in.flags == 0x0) {
+ r.in.flags = 0x80000000;
+ goto again;
+ }
+
+ r.in.flags = 0x0;
}
return True;