}
status = rpccli_winreg_OpenKey(pipe_hnd, mem_ctx, hive_hnd, key, 0,
- access_mask, key_hnd);
+ access_mask, key_hnd, NULL);
if (!(NT_STATUS_IS_OK(status))) {
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, hive_hnd);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, hive_hnd, NULL);
return status;
}
status = rpccli_winreg_QueryInfoKey(
pipe_hnd, mem_ctx, key_hnd, &classname, &num_subkeys,
&max_subkeylen, &max_classlen, &num_values, &max_valnamelen,
- &max_valbufsize, &secdescsize, &last_changed_time );
+ &max_valbufsize, &secdescsize, &last_changed_time, NULL );
if (!NT_STATUS_IS_OK(status)) {
goto error;
struct winreg_StringBuf class_buf;
struct winreg_StringBuf name_buf;
NTTIME modtime;
+ WERROR werr;
c = '\0';
class_buf.name = &c;
status = rpccli_winreg_EnumKey(pipe_hnd, mem_ctx, key_hnd,
i, &name_buf, &class_buf,
- &modtime);
+ &modtime, &werr);
- if (W_ERROR_EQUAL(ntstatus_to_werror(status),
+ if (W_ERROR_EQUAL(werr,
WERR_NO_MORE_ITEMS) ) {
status = NT_STATUS_OK;
break;
status = rpccli_winreg_QueryInfoKey(
pipe_hnd, mem_ctx, key_hnd, &classname, &num_subkeys,
&max_subkeylen, &max_classlen, &num_values, &max_valnamelen,
- &max_valbufsize, &secdescsize, &last_changed_time );
+ &max_valbufsize, &secdescsize, &last_changed_time, NULL );
if (!NT_STATUS_IS_OK(status)) {
goto error;
status = rpccli_winreg_EnumValue(pipe_hnd, mem_ctx, key_hnd,
i, &name_buf, &type,
data, &data_size,
- &value_length );
+ &value_length, &err);
- if ( W_ERROR_EQUAL(ntstatus_to_werror(status),
+ if ( W_ERROR_EQUAL(err,
WERR_NO_MORE_ITEMS) ) {
status = NT_STATUS_OK;
break;
struct KeySecurityData *sd)
{
return rpccli_winreg_GetKeySecurity(pipe_hnd, mem_ctx, key_hnd,
- sec_info, sd);
+ sec_info, sd, NULL);
}
name_string.name = name;
result = rpccli_winreg_SetValue(pipe_hnd, blob.data, key_hnd,
name_string, value->type,
- blob.data, blob.length);
+ blob.data, blob.length, NULL);
TALLOC_FREE(blob.data);
return result;
}
}
error:
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &key_hnd);
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &key_hnd, NULL);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd, NULL);
return NT_STATUS_OK;
}
valuename.name = argv[1];
status = rpccli_winreg_DeleteValue(pipe_hnd, mem_ctx, &key_hnd,
- valuename);
+ valuename, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "registry_deletevalue failed: %s\n",
nt_errstr(status));
}
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &key_hnd);
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &key_hnd, NULL);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd, NULL);
return NT_STATUS_OK;
}
status = rpccli_winreg_CreateKey(pipe_hnd, mem_ctx, &hive_hnd, key,
keyclass, 0, REG_KEY_READ, NULL,
- &key_hnd, &action);
+ &key_hnd, &action, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "createkey returned %s\n",
nt_errstr(status));
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd, NULL);
return status;
}
break;
}
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &key_hnd);
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &key_hnd, NULL);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd, NULL);
return status;
}
return status;
}
- status = rpccli_winreg_DeleteKey(pipe_hnd, mem_ctx, &hive_hnd, key);
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd);
+ status = rpccli_winreg_DeleteKey(pipe_hnd, mem_ctx, &hive_hnd, key, NULL);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &hive_hnd, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "deletekey returned %s\n",
d_printf("\n");
}
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_key );
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_hive );
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_key, NULL);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_hive, NULL);
return status;
}
}
filename.name = argv[1];
- status = rpccli_winreg_SaveKey( pipe_hnd, mem_ctx, &pol_key, &filename, NULL );
+ status = rpccli_winreg_SaveKey( pipe_hnd, mem_ctx, &pol_key, &filename, NULL, NULL);
if ( !W_ERROR_IS_OK(result) ) {
d_fprintf(stderr, "Unable to save [%s] to %s:%s\n", argv[0], cli->desthost, argv[1]);
}
/* cleanup */
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_key );
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_hive );
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_key, NULL);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_hive, NULL);
return status;
}
display_sec_desc(&sec_desc);
out:
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_key);
- rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_hive);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_key, NULL);
+ rpccli_winreg_CloseKey(pipe_hnd, mem_ctx, &pol_hive, NULL);
return status;
}