1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r62: Fix the build

(This used to be commit 1396db8537)
This commit is contained in:
Jelmer Vernooij 2004-04-05 22:34:24 +00:00 committed by Gerald (Jerry) Carter
parent b96025eb15
commit f9235e0964
4 changed files with 12 additions and 7 deletions

View File

@ -75,7 +75,7 @@
[in,out] uint32 reserved,
[in] uint32 access_mask,
[in] uint32 sec_info,
[in] sec_desc_buf data,
[in] sec_desc_buf *sec_desc,
[in] uint32 reserved2
);

View File

@ -41,6 +41,7 @@ static NTSTATUS winreg_bind(struct dcesrv_call_state *dc, const struct dcesrv_in
struct _privatedata *data;
data = talloc(dc->mem_ctx, sizeof(struct _privatedata));
data->registry = reg_open("nt4", "/home/aurelia/jelmer/NTUSER.DAT", False);
if(!data->registry) return NT_STATUS_UNSUCCESSFUL;
dc->conn->private = data;
return NT_STATUS_OK;
}
@ -66,14 +67,15 @@ static NTSTATUS winreg_OpenHKCU(struct dcesrv_call_state *dce_call, TALLOC_CTX *
struct winreg_OpenHKCU *r)
{
struct _privatedata *data = dce_call->conn->private;
REG_KEY *k = reg_open_key(reg_get_root(data->registry), "\\HKEY_CURRENT_USER");
REG_KEY *root = reg_get_root(data->registry);
REG_KEY *k = reg_open_key(root, "\\HKEY_CURRENT_USER");
if(!k) {
r->out.result = WERR_BADFILE;
} else {
struct dcesrv_handle *h = dcesrv_handle_new(dce_call->conn, HTYPE_REGKEY);
h->data = k;
r->out.handle = &(h->wire_handle);
r->out.handle = &h->wire_handle;
}
r->out.result = WERR_OK;

View File

@ -59,6 +59,7 @@ static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct winreg_CreateKey r;
struct policy_handle newhandle;
NTSTATUS status;
struct sec_desc_buf sec_desc;
printf("\ntesting CreateKey\n");
@ -71,7 +72,9 @@ static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.access_mask = 0x02000000;
r.out.reserved = 0x0;
r.in.sec_info = 0x0;
r.in.data = 0;
sec_desc.size = 0;
sec_desc.sd = NULL;
r.in.sec_desc = &sec_desc;
status = dcerpc_winreg_CreateKey(p, mem_ctx, &r);
@ -130,7 +133,7 @@ static BOOL test_FlushKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
static BOOL test_OpenKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *hive_handle,
char *keyname, struct policy_handle *key_handle)
const char *keyname, struct policy_handle *key_handle)
{
NTSTATUS status;
struct winreg_OpenKey r;
@ -154,7 +157,7 @@ static BOOL test_OpenKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
static BOOL test_DeleteKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *handle, char *key)
struct policy_handle *handle, const char *key)
{
NTSTATUS status;
struct winreg_DeleteKey r;