diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-04 09:48:33 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-04 09:48:33 +0000 |
commit | 485f930088b524d704bed668d4ef118ca2f31bbe (patch) | |
tree | 8d99494f3e128c539169967276dc9f5dd9115997 /source4/torture/rpc | |
parent | 46046aa69be01d4868395b9b52b8bcd22c3859e5 (diff) | |
download | samba-485f930088b524d704bed668d4ef118ca2f31bbe.tar.gz samba-485f930088b524d704bed668d4ef118ca2f31bbe.tar.bz2 samba-485f930088b524d704bed668d4ef118ca2f31bbe.zip |
lsa_OpenPolicy2 now works
(This used to be commit 9cf479873f3501776091c9d01551adadcf525794)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/lsa.c | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 95a07ef0c6..a4062d1181 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -28,6 +28,8 @@ static BOOL test_OpenPolicy(struct dcerpc_pipe *p) struct lsa_QosInfo qos; NTSTATUS status; + printf("testing OpenPolicy\n"); + qos.impersonation_level = 2; qos.context_mode = 1; qos.effective_only = 0; @@ -51,11 +53,45 @@ static BOOL test_OpenPolicy(struct dcerpc_pipe *p) return True; } + +static BOOL test_OpenPolicy2(struct dcerpc_pipe *p) +{ + struct lsa_ObjectAttribute attr; + struct policy_handle handle; + struct lsa_QosInfo qos; + NTSTATUS status; + + printf("testing OpenPolicy2\n"); + + qos.impersonation_level = 2; + qos.context_mode = 1; + qos.effective_only = 0; + + attr.root_dir = NULL; + attr.object_name = NULL; + attr.attributes = 0; + attr.sec_desc = NULL; + attr.sec_qos = &qos; + + status = dcerpc_lsa_OpenPolicy2(p, + "\\", + &attr, + SEC_RIGHTS_MAXIMUM_ALLOWED, + &handle); + if (!NT_STATUS_IS_OK(status)) { + printf("OpenPolicy2 failed - %s\n", nt_errstr(status)); + return False; + } + + return True; +} + BOOL torture_rpc_lsa(int dummy) { NTSTATUS status; struct dcerpc_pipe *p; TALLOC_CTX *mem_ctx; + BOOL ret = True; mem_ctx = talloc_init("torture_rpc_lsa"); @@ -64,9 +100,15 @@ BOOL torture_rpc_lsa(int dummy) return False; } - test_OpenPolicy(p); + if (!test_OpenPolicy(p)) { + ret = False; + } + + if (!test_OpenPolicy2(p)) { + ret = False; + } torture_rpc_close(p); - return NT_STATUS_IS_OK(status); + return ret; } |