diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-04-05 22:34:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:50:41 -0500 |
commit | f9235e0964d921cc1df7b4c4b7ab91a1c1ab4d54 (patch) | |
tree | 061181b051405357299a0992614bc5da69aabc59 | |
parent | b96025eb15e3648e77e0e6aa343e23ca2f1156da (diff) | |
download | samba-f9235e0964d921cc1df7b4c4b7ab91a1c1ab4d54.tar.gz samba-f9235e0964d921cc1df7b4c4b7ab91a1c1ab4d54.tar.bz2 samba-f9235e0964d921cc1df7b4c4b7ab91a1c1ab4d54.zip |
r62: Fix the build
(This used to be commit 1396db85372af1824592ef66f963603e3f35803c)
-rw-r--r-- | source4/librpc/idl/winreg.idl | 2 | ||||
-rw-r--r-- | source4/rpc_server/handles.c | 2 | ||||
-rw-r--r-- | source4/rpc_server/winreg/rpc_winreg.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/winreg.c | 9 |
4 files changed, 12 insertions, 7 deletions
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl index e522d839ef..56c7ba6dde 100644 --- a/source4/librpc/idl/winreg.idl +++ b/source4/librpc/idl/winreg.idl @@ -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 ); diff --git a/source4/rpc_server/handles.c b/source4/rpc_server/handles.c index 611dc42f76..043318c075 100644 --- a/source4/rpc_server/handles.c +++ b/source4/rpc_server/handles.c @@ -32,7 +32,7 @@ struct dcesrv_handle *dcesrv_handle_new(struct dcesrv_connection *dce_conn, struct dcesrv_handle *h; mem_ctx = talloc_init("rpc handle type %d\n", handle_type); -if (!mem_ctx) { + if (!mem_ctx) { return NULL; } h = talloc(mem_ctx, sizeof(*h)); diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c index e5658abb09..c50512d48e 100644 --- a/source4/rpc_server/winreg/rpc_winreg.c +++ b/source4/rpc_server/winreg/rpc_winreg.c @@ -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; diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index 41804d3302..72fdc96c11 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -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; |