r4660: Test what we should return for a secret that does not exist.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 11 Jan 2005 01:36:26 +0000 (01:36 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:08:39 +0000 (13:08 -0500)
Andrew Bartlett
(This used to be commit a17a8fbf9a843c2c9e10940878b43ad8e1583091)

source4/torture/rpc/lsa.c

index 7f1411ea845288fc7cf19f1452a52a30038341ea..7cb5a0588490889df32fd7617b6966f4360512e6 100644 (file)
@@ -796,6 +796,15 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
                        printf("Second delete expected INVALID_HANDLE - %s\n", nt_errstr(status));
                        ret = False;
                }
+
+               printf("Testing OpenSecret of just-deleted secret\n");
+               
+               status = dcerpc_lsa_OpenSecret(p, mem_ctx, &r2);
+               if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
+                       printf("OpenSecret expected OBJECT_NAME_NOT_FOUND - %s\n", nt_errstr(status));
+                       ret = False;
+               }
+               
        }
 
        return ret;