mirror of
https://github.com/samba-team/samba.git
synced 2025-03-03 12:58:35 +03:00
added IDL and test for lsa_OpenSecret()
(This used to be commit dd95cd141dc63f16e14f4c9392529653084b5a2a)
This commit is contained in:
parent
84d009d52e
commit
c582f5cf1d
@ -401,8 +401,15 @@
|
|||||||
NTSTATUS QUERYTRUSTDOM ();
|
NTSTATUS QUERYTRUSTDOM ();
|
||||||
/* Function: 0x1b */
|
/* Function: 0x1b */
|
||||||
NTSTATUS SETINFOTRUSTDOM ();
|
NTSTATUS SETINFOTRUSTDOM ();
|
||||||
|
|
||||||
/* Function: 0x1c */
|
/* Function: 0x1c */
|
||||||
NTSTATUS OPENSECRET ();
|
NTSTATUS lsa_OpenSecret(
|
||||||
|
[in,ref] policy_handle *handle,
|
||||||
|
[in] lsa_Name name,
|
||||||
|
[in] uint32 desired_access,
|
||||||
|
[out,ref] policy_handle *sec_handle
|
||||||
|
);
|
||||||
|
|
||||||
/* Function: 0x1d */
|
/* Function: 0x1d */
|
||||||
NTSTATUS SETSECRET ();
|
NTSTATUS SETSECRET ();
|
||||||
/* Function: 0x1e */
|
/* Function: 0x1e */
|
||||||
|
@ -386,7 +386,9 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
|
|||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct lsa_CreateSecret r;
|
struct lsa_CreateSecret r;
|
||||||
struct policy_handle sec_handle;
|
struct lsa_OpenSecret r2;
|
||||||
|
struct policy_handle sec_handle, sec_handle2;
|
||||||
|
struct lsa_Delete d;
|
||||||
|
|
||||||
printf("Testing CreateSecret\n");
|
printf("Testing CreateSecret\n");
|
||||||
|
|
||||||
@ -402,10 +404,30 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
|
|||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r2.in.handle = handle;
|
||||||
|
r2.in.desired_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
|
||||||
|
init_lsa_Name(&r2.in.name, "torturesecret");
|
||||||
|
r2.out.sec_handle = &sec_handle2;
|
||||||
|
|
||||||
|
printf("Testing OpenSecret\n");
|
||||||
|
|
||||||
|
status = dcerpc_lsa_OpenSecret(p, mem_ctx, &r2);
|
||||||
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
printf("OpenSecret failed - %s\n", nt_errstr(status));
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
if (!test_Delete(p, mem_ctx, &sec_handle)) {
|
if (!test_Delete(p, mem_ctx, &sec_handle)) {
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
d.in.handle = &sec_handle2;
|
||||||
|
status = dcerpc_lsa_Delete(p, mem_ctx, &d);
|
||||||
|
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_HANDLE)) {
|
||||||
|
printf("Second delete expected INVALID_HANDLE - %s\n", nt_errstr(status));
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user