2006-09-15 18:32:43 +00:00
/*
* Unix SMB / CIFS implementation .
* client auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
# include "librpc/gen_ndr/cli_winreg.h"
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKCR ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKCR r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKCR , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKCR ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKCR , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKCU ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKCU r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKCU , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKCU ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKCU , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKLM ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKLM r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKLM , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKLM ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKLM , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKPD ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKPD r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKPD , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKPD ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKPD , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKU ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKU r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKU , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKU ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKU , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_CloseKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_CloseKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_CloseKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_CLOSEKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_CloseKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_CreateKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String name ,
struct winreg_String keyclass ,
uint32_t options ,
uint32_t access_mask ,
struct winreg_SecBuf * secdesc ,
struct policy_handle * new_handle ,
enum winreg_CreateAction * action_taken ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_CreateKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . name = name ;
r . in . keyclass = keyclass ;
r . in . options = options ;
r . in . access_mask = access_mask ;
r . in . secdesc = secdesc ;
2007-01-16 15:42:03 +00:00
r . in . action_taken = action_taken ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_CreateKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_CREATEKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_CreateKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* new_handle = * r . out . new_handle ;
2007-10-17 10:35:51 +02:00
if ( action_taken & & r . out . action_taken ) {
2007-01-16 15:42:03 +00:00
* action_taken = * r . out . action_taken ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_DeleteKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String key ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_DeleteKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . key = key ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_DeleteKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_DELETEKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_DeleteKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_DeleteValue ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String value ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_DeleteValue r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . value = value ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_DeleteValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_DELETEVALUE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_DeleteValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_EnumKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
uint32_t enum_index ,
struct winreg_StringBuf * name ,
struct winreg_StringBuf * keyclass ,
NTTIME * last_changed_time ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_EnumKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . enum_index = enum_index ;
r . in . name = name ;
2007-01-16 15:42:03 +00:00
r . in . keyclass = keyclass ;
r . in . last_changed_time = last_changed_time ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_EnumKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_ENUMKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_EnumKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* name = * r . out . name ;
2007-10-17 10:35:51 +02:00
if ( keyclass & & r . out . keyclass ) {
2007-01-16 15:42:03 +00:00
* keyclass = * r . out . keyclass ;
}
2007-10-17 10:35:51 +02:00
if ( last_changed_time & & r . out . last_changed_time ) {
2007-01-16 15:42:03 +00:00
* last_changed_time = * r . out . last_changed_time ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_EnumValue ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
uint32_t enum_index ,
struct winreg_ValNameBuf * name ,
enum winreg_Type * type ,
uint8_t * value ,
uint32_t * size ,
uint32_t * length ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_EnumValue r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . enum_index = enum_index ;
r . in . name = name ;
2007-01-16 15:42:03 +00:00
r . in . type = type ;
2007-02-20 13:43:41 +00:00
r . in . value = value ;
2007-02-16 14:50:57 +00:00
r . in . size = size ;
r . in . length = length ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_EnumValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_ENUMVALUE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_EnumValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* name = * r . out . name ;
2007-10-17 10:35:51 +02:00
if ( type & & r . out . type ) {
2007-01-16 15:42:03 +00:00
* type = * r . out . type ;
}
2007-10-17 10:35:51 +02:00
if ( value & & r . out . value ) {
2007-08-15 10:30:44 +00:00
memcpy ( value , r . out . value , * r . in . size ) ;
2007-01-16 15:42:03 +00:00
}
2007-10-17 10:35:51 +02:00
if ( size & & r . out . size ) {
2007-02-16 14:50:57 +00:00
* size = * r . out . size ;
}
2007-10-17 10:35:51 +02:00
if ( length & & r . out . length ) {
2007-02-16 14:50:57 +00:00
* length = * r . out . length ;
2007-01-16 15:42:03 +00:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_FlushKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_FlushKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_FlushKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_FLUSHKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_FlushKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_GetKeySecurity ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
uint32_t sec_info ,
struct KeySecurityData * sd ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_GetKeySecurity r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . sec_info = sec_info ;
r . in . sd = sd ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_GetKeySecurity , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_GETKEYSECURITY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_GetKeySecurity , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* sd = * r . out . sd ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_LoadKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String * keyname ,
struct winreg_String * filename ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_LoadKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . keyname = keyname ;
r . in . filename = filename ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_LoadKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_LOADKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_LoadKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_NotifyChangeKeyValue ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
uint8_t watch_subtree ,
uint32_t notify_filter ,
uint32_t unknown ,
struct winreg_String string1 ,
struct winreg_String string2 ,
uint32_t unknown2 ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_NotifyChangeKeyValue r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . watch_subtree = watch_subtree ;
r . in . notify_filter = notify_filter ;
r . in . unknown = unknown ;
r . in . string1 = string1 ;
r . in . string2 = string2 ;
r . in . unknown2 = unknown2 ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_NotifyChangeKeyValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_NOTIFYCHANGEKEYVALUE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_NotifyChangeKeyValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * parent_handle ,
struct winreg_String keyname ,
uint32_t unknown ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . parent_handle = parent_handle ;
r . in . keyname = keyname ;
r . in . unknown = unknown ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_QueryInfoKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String * classname ,
uint32_t * num_subkeys ,
uint32_t * max_subkeylen ,
uint32_t * max_classlen ,
uint32_t * num_values ,
uint32_t * max_valnamelen ,
uint32_t * max_valbufsize ,
uint32_t * secdescsize ,
NTTIME * last_changed_time ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_QueryInfoKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
2006-09-26 21:01:57 +00:00
r . in . classname = classname ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_QueryInfoKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_QUERYINFOKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_QueryInfoKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2006-09-26 21:01:57 +00:00
* classname = * r . out . classname ;
2006-09-15 18:32:43 +00:00
* num_subkeys = * r . out . num_subkeys ;
* max_subkeylen = * r . out . max_subkeylen ;
2006-09-28 21:19:08 +00:00
* max_classlen = * r . out . max_classlen ;
2006-09-15 18:32:43 +00:00
* num_values = * r . out . num_values ;
* max_valnamelen = * r . out . max_valnamelen ;
* max_valbufsize = * r . out . max_valbufsize ;
* secdescsize = * r . out . secdescsize ;
* last_changed_time = * r . out . last_changed_time ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_QueryValue ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String value_name ,
enum winreg_Type * type ,
uint8_t * data ,
uint32_t * data_size ,
uint32_t * value_length ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_QueryValue r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . value_name = value_name ;
2007-01-16 15:42:03 +00:00
r . in . type = type ;
r . in . data = data ;
r . in . data_size = data_size ;
r . in . value_length = value_length ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_QueryValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_QUERYVALUE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_QueryValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2007-10-17 10:35:51 +02:00
if ( type & & r . out . type ) {
2007-01-16 15:42:03 +00:00
* type = * r . out . type ;
}
2007-10-17 10:35:51 +02:00
if ( data & & r . out . data ) {
2007-08-15 10:30:44 +00:00
memcpy ( data , r . out . data , * r . in . data_size ) ;
2007-01-16 15:42:03 +00:00
}
2007-10-17 10:35:51 +02:00
if ( data_size & & r . out . data_size ) {
2007-01-16 15:42:03 +00:00
* data_size = * r . out . data_size ;
}
2007-10-17 10:35:51 +02:00
if ( value_length & & r . out . value_length ) {
2007-01-16 15:42:03 +00:00
* value_length = * r . out . value_length ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_ReplaceKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_ReplaceKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_ReplaceKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_REPLACEKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_ReplaceKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_RestoreKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String * filename ,
uint32_t flags ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_RestoreKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
2006-09-27 16:05:25 +00:00
r . in . handle = handle ;
r . in . filename = filename ;
r . in . flags = flags ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_RestoreKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_RESTOREKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_RestoreKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_SaveKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String * filename ,
struct KeySecurityAttribute * sec_attrib ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_SaveKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
2006-09-27 16:05:25 +00:00
r . in . handle = handle ;
r . in . filename = filename ;
r . in . sec_attrib = sec_attrib ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_SaveKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_SAVEKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_SaveKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_SetKeySecurity ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
uint32_t access_mask ,
struct KeySecurityData * sd ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_SetKeySecurity r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . access_mask = access_mask ;
r . in . sd = sd ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_SetKeySecurity , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_SETKEYSECURITY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_SetKeySecurity , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_SetValue ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
struct winreg_String name ,
enum winreg_Type type ,
uint8_t * data ,
uint32_t size ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_SetValue r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . name = name ;
r . in . type = type ;
r . in . data = data ;
r . in . size = size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_SetValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_SETVALUE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_SetValue , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_UnLoadKey ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_UnLoadKey r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_UnLoadKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_UNLOADKEY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_UnLoadKey , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_InitiateSystemShutdown ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * hostname ,
struct initshutdown_String * message ,
uint32_t timeout ,
uint8_t force_apps ,
uint8_t reboot ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_InitiateSystemShutdown r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . hostname = hostname ;
r . in . message = message ;
r . in . timeout = timeout ;
r . in . force_apps = force_apps ;
r . in . reboot = reboot ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_InitiateSystemShutdown , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_INITIATESYSTEMSHUTDOWN ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_InitiateSystemShutdown , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_AbortSystemShutdown ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * server ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_AbortSystemShutdown r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . server = server ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_AbortSystemShutdown , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_ABORTSYSTEMSHUTDOWN ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_AbortSystemShutdown , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_GetVersion ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * handle ,
uint32_t * version ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_GetVersion r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . handle = handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_GetVersion , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_GETVERSION ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_GetVersion , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* version = * r . out . version ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKCC ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKCC r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKCC , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKCC ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKCC , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKDD ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKDD r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKDD , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKDD ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKDD , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_QueryMultipleValues ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
struct policy_handle * key_handle ,
struct QueryMultipleValue * values ,
uint32_t num_values ,
uint8_t * buffer ,
uint32_t * buffer_size ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_QueryMultipleValues r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . key_handle = key_handle ;
r . in . values = values ;
r . in . num_values = num_values ;
2007-01-16 15:42:03 +00:00
r . in . buffer = buffer ;
2006-09-15 18:32:43 +00:00
r . in . buffer_size = buffer_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_QueryMultipleValues , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_QUERYMULTIPLEVALUES ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_QueryMultipleValues , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2007-08-15 10:30:44 +00:00
memcpy ( values , r . out . values , r . in . num_values ) ;
2007-10-17 10:35:51 +02:00
if ( buffer & & r . out . buffer ) {
2007-08-15 10:30:44 +00:00
memcpy ( buffer , r . out . buffer , * r . in . buffer_size ) ;
2007-01-16 15:42:03 +00:00
}
2006-09-15 18:32:43 +00:00
* buffer_size = * r . out . buffer_size ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_InitiateSystemShutdownEx ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * hostname ,
struct initshutdown_String * message ,
uint32_t timeout ,
uint8_t force_apps ,
uint8_t reboot ,
uint32_t reason ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_InitiateSystemShutdownEx r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . hostname = hostname ;
r . in . message = message ;
r . in . timeout = timeout ;
r . in . force_apps = force_apps ;
r . in . reboot = reboot ;
r . in . reason = reason ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_InitiateSystemShutdownEx , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_INITIATESYSTEMSHUTDOWNEX ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_InitiateSystemShutdownEx , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_SaveKeyEx ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_SaveKeyEx r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_SaveKeyEx , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_SAVEKEYEX ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_SaveKeyEx , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKPT ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKPT r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKPT , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKPT ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKPT , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_OpenHKPN ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
uint16_t * system_name ,
uint32_t access_mask ,
struct policy_handle * handle ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_OpenHKPN r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
r . in . system_name = system_name ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_OpenHKPN , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_OPENHKPN ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_OpenHKPN , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_winreg_QueryMultipleValues2 ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-15 18:32:43 +00:00
{
struct winreg_QueryMultipleValues2 r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_IN_DEBUG ( winreg_QueryMultipleValues2 , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_WINREG ,
& ndr_table_winreg ,
NDR_WINREG_QUERYMULTIPLEVALUES2 ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-19 22:39:15 +00:00
NDR_PRINT_OUT_DEBUG ( winreg_QueryMultipleValues2 , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-15 18:32:43 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}