summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/lsa.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-01-11 22:16:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:44 -0500
commit4e052c17042a597b0cba99f26e0e93ba50cf8083 (patch)
tree13292ce3098079e9c310fceeabd4cb4707476f00 /source4/torture/rpc/lsa.c
parent91f70398df8cfee767053c01222220e969dcb593 (diff)
downloadsamba-4e052c17042a597b0cba99f26e0e93ba50cf8083.tar.gz
samba-4e052c17042a597b0cba99f26e0e93ba50cf8083.tar.bz2
samba-4e052c17042a597b0cba99f26e0e93ba50cf8083.zip
r4694: 'fix' the behaviour for setting only the old, but not the new secret.
(The behaviour is a little odd, but we wanted bug-for-bug, right? :-) Andrew Bartlett (This used to be commit 6a09a84320c9ab18568a66efb3839a8dcde834af)
Diffstat (limited to 'source4/torture/rpc/lsa.c')
-rw-r--r--source4/torture/rpc/lsa.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index c9f730cd27..c5b74c8674 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -935,10 +935,12 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
printf("QuerySecret failed - %s\n", nt_errstr(status));
ret = False;
} else {
-
- if (r8.out.new_val->buf == NULL) {
+ if (!r8.out.new_val || !r8.out.old_val) {
+ printf("in/out pointers not returned, despite being set on in for QuerySecret\n");
+ ret = False;
+ } else if (r8.out.new_val->buf == NULL) {
if (i != LOCAL) {
- printf("NEW secret buffer not returned after OLD set\n");
+ printf("NEW secret buffer not returned after GLOBAL OLD set\n");
ret = False;
}
} else if (r8.out.old_val->buf == NULL) {
@@ -948,6 +950,10 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
printf("Both times not returned after OLD set\n");
ret = False;
} else {
+ if (i == LOCAL) {
+ printf("NEW secret buffer should not be returned after LOCAL OLD set\n");
+ ret = False;
+ }
blob1.data = r8.out.new_val->buf->data;
blob1.length = r8.out.new_val->buf->length;