2 * Unix SMB/CIFS implementation.
4 * WINREG internal client routines
6 * Copyright (c) 2011 Andreas Schneider <asn@samba.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 #ifndef CLI_WINREG_INT_H
23 #define CLI_WINREG_INT_H
25 struct dcerpc_binding_handle
;
26 struct auth_serversupplied_info
;
27 struct dcerpc_binding_handle
;
30 * @brief Connect to the interal winreg server and open the given key.
32 * The function will create the needed subkeys if they don't exist.
34 * @param[in] mem_ctx The memory context to use.
36 * @param[in] session_info The supplied server info.
38 * @param[in] key The key to open. This needs to start with the name
39 * of the hive like HKLM.
41 * @param[in] create_key Set to true if the key should be created if it
44 * @param[in] access_mask The access mask to open the key.
46 * @param[out] binding_handle A pointer for the winreg dcerpc binding handle.
48 * @param[out] hive_handle A policy handle for the opened hive.
50 * @param[out] key_handle A policy handle for the opened key.
52 * @return WERR_OK on success, the corresponding DOS error
53 * code if something gone wrong.
55 NTSTATUS
dcerpc_winreg_int_openkey(TALLOC_CTX
*mem_ctx
,
56 const struct auth_serversupplied_info
*server_info
,
57 struct messaging_context
*msg_ctx
,
58 struct dcerpc_binding_handle
**h
,
62 struct policy_handle
*hive_handle
,
63 struct policy_handle
*key_handle
,
67 * @brief Connect to the interal winreg server and open the given key.
69 * The function will create the needed subkeys if they don't exist.
71 * @param[in] mem_ctx The memory context to use.
73 * @param[in] server_info The supplied server info.
75 * @param[in] key The key to open.
77 * @param[in] create_key Set to true if the key should be created if it
80 * @param[in] access_mask The access mask to open the key.
82 * @param[out] binding_handle A pointer for the winreg dcerpc binding handle.
84 * @param[out] hive_handle A policy handle for the opened hive.
86 * @param[out] key_handle A policy handle for the opened key.
88 * @return WERR_OK on success, the corresponding DOS error
89 * code if something gone wrong.
91 NTSTATUS
dcerpc_winreg_int_hklm_openkey(TALLOC_CTX
*mem_ctx
,
92 const struct auth_serversupplied_info
*session_info
,
93 struct messaging_context
*msg_ctx
,
94 struct dcerpc_binding_handle
**h
,
98 struct policy_handle
*hive_handle
,
99 struct policy_handle
*key_handle
,
102 #endif /* CLI_WINREG_INT_H */
104 /* vim: set ts=8 sw=8 noet cindent syntax=c.doxygen: */