regf 134 source4/lib/registry/regf.c static bool hbin_get_tdr(struct regf_data *regf, uint32_t offset,
regf 137 source4/lib/registry/regf.c struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
regf 139 source4/lib/registry/regf.c pull->data = hbin_get(regf, offset);
regf 393 source4/lib/registry/regf.c static uint32_t hbin_store_tdr_resize(struct regf_data *regf,
regf 397 source4/lib/registry/regf.c struct tdr_push *push = tdr_push_init(regf, regf->iconv_convenience);
regf 405 source4/lib/registry/regf.c ret = hbin_store_resize(regf, orig_offset, push->data);
regf 469 source4/lib/registry/regf.c struct regf_data *regf,
regf 477 source4/lib/registry/regf.c ret->hive = talloc_reference(ret, regf);
regf 485 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, offset, nk,
regf 508 source4/lib/registry/regf.c struct regf_data *regf = private_data->hive;
regf 515 source4/lib/registry/regf.c tmp = hbin_get(regf, private_data->nk->values_offset);
regf 530 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, vk_offset, vk,
regf 549 source4/lib/registry/regf.c *data = hbin_get(regf, vk->data_offset);
regf 1043 source4/lib/registry/regf.c struct regf_data *regf = private_data->hive;
regf 1050 source4/lib/registry/regf.c hbin_get_tdr(regf, regf->header->data_offset, regf,
regf 1054 source4/lib/registry/regf.c if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_struct_blob(&data, regf, NULL,
regf 1061 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, private_data->nk->sk_offset, regf,
regf 1075 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, cur_sk.prev_offset, regf,
regf 1082 source4/lib/registry/regf.c hbin_store_tdr_resize(regf, (tdr_push_fn_t) tdr_push_sk_block,
regf 1086 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, cur_sk.next_offset, regf,
regf 1093 source4/lib/registry/regf.c hbin_store_tdr_resize(regf, (tdr_push_fn_t) tdr_push_sk_block,
regf 1096 source4/lib/registry/regf.c hbin_free(regf, private_data->nk->sk_offset);
regf 1107 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, sk_offset, regf,
regf 1115 source4/lib/registry/regf.c hbin_store_tdr_resize(regf,
regf 1118 source4/lib/registry/regf.c hbin_store_tdr_resize(regf,
regf 1135 source4/lib/registry/regf.c sk_offset = hbin_store_tdr(regf,
regf 1145 source4/lib/registry/regf.c hbin_store_tdr_resize(regf,
regf 1151 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, new_sk.prev_offset, regf,
regf 1158 source4/lib/registry/regf.c hbin_store_tdr_resize(regf,
regf 1163 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, new_sk.next_offset, regf,
regf 1170 source4/lib/registry/regf.c hbin_store_tdr_resize(regf,
regf 1176 source4/lib/registry/regf.c hbin_store_tdr_resize(regf,
regf 1188 source4/lib/registry/regf.c struct regf_data *regf = private_data->hive;
regf 1191 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, private_data->nk->sk_offset, ctx,
regf 1216 source4/lib/registry/regf.c static WERROR regf_sl_add_entry(struct regf_data *regf, uint32_t list_offset,
regf 1224 source4/lib/registry/regf.c if (regf->header->version.major != 1) {
regf 1228 source4/lib/registry/regf.c if (regf->header->version.minor < 3) {
regf 1235 source4/lib/registry/regf.c li.nk_offset = talloc_array(regf, uint32_t, 1);
regf 1239 source4/lib/registry/regf.c *ret = hbin_store_tdr(regf,
regf 1244 source4/lib/registry/regf.c } else if (regf->header->version.minor == 3 ||
regf 1245 source4/lib/registry/regf.c regf->header->version.minor == 4) {
regf 1252 source4/lib/registry/regf.c lf.hr = talloc_array(regf, struct hash_record, 1);
regf 1258 source4/lib/registry/regf.c *ret = hbin_store_tdr(regf,
regf 1263 source4/lib/registry/regf.c } else if (regf->header->version.minor == 5) {
regf 1270 source4/lib/registry/regf.c lh.hr = talloc_array(regf, struct lh_hash, 1);
regf 1275 source4/lib/registry/regf.c *ret = hbin_store_tdr(regf,
regf 1284 source4/lib/registry/regf.c data = hbin_get(regf, list_offset);
regf 1291 source4/lib/registry/regf.c struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
regf 1296 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_pull_li_block(pull, regf, &li))) {
regf 1309 source4/lib/registry/regf.c li.nk_offset = talloc_realloc(regf, li.nk_offset,
regf 1314 source4/lib/registry/regf.c *ret = hbin_store_tdr_resize(regf,
regf 1320 source4/lib/registry/regf.c struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
regf 1325 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_pull_lf_block(pull, regf, &lf))) {
regf 1333 source4/lib/registry/regf.c lf.hr = talloc_realloc(regf, lf.hr, struct hash_record,
regf 1340 source4/lib/registry/regf.c *ret = hbin_store_tdr_resize(regf,
regf 1346 source4/lib/registry/regf.c struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
regf 1351 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_pull_lh_block(pull, regf, &lh))) {
regf 1359 source4/lib/registry/regf.c lh.hr = talloc_realloc(regf, lh.hr, struct lh_hash,
regf 1365 source4/lib/registry/regf.c *ret = hbin_store_tdr_resize(regf,
regf 1382 source4/lib/registry/regf.c static WERROR regf_sl_del_entry(struct regf_data *regf, uint32_t list_offset,
regf 1387 source4/lib/registry/regf.c data = hbin_get(regf, list_offset);
regf 1395 source4/lib/registry/regf.c struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
regf 1403 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_pull_li_block(pull, regf, &li))) {
regf 1429 source4/lib/registry/regf.c hbin_free(regf, list_offset);
regf 1434 source4/lib/registry/regf.c *ret = hbin_store_tdr_resize(regf,
regf 1439 source4/lib/registry/regf.c struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
regf 1447 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_pull_lf_block(pull, regf, &lf))) {
regf 1474 source4/lib/registry/regf.c hbin_free(regf, list_offset);
regf 1480 source4/lib/registry/regf.c *ret = hbin_store_tdr_resize(regf,
regf 1485 source4/lib/registry/regf.c struct tdr_pull *pull = tdr_pull_init(regf, regf->iconv_convenience);
regf 1493 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_pull_lh_block(pull, regf, &lh))) {
regf 1520 source4/lib/registry/regf.c hbin_free(regf, list_offset);
regf 1526 source4/lib/registry/regf.c *ret = hbin_store_tdr_resize(regf,
regf 1543 source4/lib/registry/regf.c struct regf_data *regf = private_data->hive;
regf 1555 source4/lib/registry/regf.c values = hbin_get(regf, nk->values_offset);
regf 1562 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, vk_offset, private_data,
regf 1570 source4/lib/registry/regf.c hbin_free(regf, vk_offset);
regf 1584 source4/lib/registry/regf.c hbin_free(regf, nk->values_offset);
regf 1587 source4/lib/registry/regf.c nk->values_offset = hbin_store_resize(regf,
regf 1591 source4/lib/registry/regf.c hbin_store_tdr_resize(regf, (tdr_push_fn_t) tdr_push_nk_block,
regf 1704 source4/lib/registry/regf.c struct regf_data *regf = private_data->hive;
regf 1728 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, regf->header->data_offset, root,
regf 1737 source4/lib/registry/regf.c offset = hbin_store_tdr(regf, (tdr_push_fn_t) tdr_push_nk_block, &nk);
regf 1739 source4/lib/registry/regf.c error = regf_sl_add_entry(regf, parent_nk->subkeys_offset, name, offset,
regf 1742 source4/lib/registry/regf.c hbin_free(regf, offset);
regf 1749 source4/lib/registry/regf.c hbin_store_tdr_resize(regf, (tdr_push_fn_t) tdr_push_nk_block,
regf 1752 source4/lib/registry/regf.c *ret = (struct hive_key *)regf_get_key(ctx, regf, offset);
regf 1761 source4/lib/registry/regf.c struct regf_data *regf = private_data->hive;
regf 1772 source4/lib/registry/regf.c values = hbin_get(regf, nk->values_offset);
regf 1776 source4/lib/registry/regf.c if (!hbin_get_tdr(regf, tmp_vk_offset, private_data,
regf 1790 source4/lib/registry/regf.c hbin_free(regf, vk.data_offset);
regf 1812 source4/lib/registry/regf.c vk.data_offset = hbin_store(regf, data);
regf 1816 source4/lib/registry/regf.c vk_offset = hbin_store_tdr(regf,
regf 1821 source4/lib/registry/regf.c vk_offset = hbin_store_tdr_resize(regf,
regf 1828 source4/lib/registry/regf.c nk->values_offset = hbin_store_tdr(regf,
regf 1856 source4/lib/registry/regf.c nk->values_offset = hbin_store_resize(regf,
regf 1862 source4/lib/registry/regf.c hbin_store_tdr_resize(regf,
regf 1868 source4/lib/registry/regf.c static WERROR regf_save_hbin(struct regf_data *regf)
regf 1870 source4/lib/registry/regf.c struct tdr_push *push = tdr_push_init(regf, regf->iconv_convenience);
regf 1875 source4/lib/registry/regf.c if (lseek(regf->fd, 0, SEEK_SET) == -1) {
regf 1881 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_push_regf_hdr(push, regf->header))) {
regf 1885 source4/lib/registry/regf.c regf->header->chksum = regf_hdr_checksum(push->data.data);
regf 1888 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_push_to_fd(regf->fd, regf->iconv_convenience,
regf 1890 source4/lib/registry/regf.c regf->header))) {
regf 1895 source4/lib/registry/regf.c if (lseek(regf->fd, 0x1000, SEEK_SET) == -1) {
regf 1900 source4/lib/registry/regf.c for (i = 0; regf->hbins[i]; i++) {
regf 1901 source4/lib/registry/regf.c if (NT_STATUS_IS_ERR(tdr_push_to_fd(regf->fd, regf->iconv_convenience,
regf 1903 source4/lib/registry/regf.c regf->hbins[i]))) {
regf 1917 source4/lib/registry/regf.c struct regf_data *regf;
regf 1926 source4/lib/registry/regf.c regf = (struct regf_data *)talloc_zero(NULL, struct regf_data);
regf 1928 source4/lib/registry/regf.c regf->iconv_convenience = iconv_convenience;
regf 1930 source4/lib/registry/regf.c W_ERROR_HAVE_NO_MEMORY(regf);
regf 1935 source4/lib/registry/regf.c regf->fd = creat(location, 0644);
regf 1937 source4/lib/registry/regf.c if (regf->fd == -1) {
regf 1940 source4/lib/registry/regf.c talloc_free(regf);
regf 1944 source4/lib/registry/regf.c regf_hdr = talloc_zero(regf, struct regf_hdr);
regf 1956 source4/lib/registry/regf.c regf->header = regf_hdr;
regf 1959 source4/lib/registry/regf.c regf->hbins = talloc_array(regf, struct hbin_block *, 1);
regf 1960 source4/lib/registry/regf.c W_ERROR_HAVE_NO_MEMORY(regf->hbins);
regf 1961 source4/lib/registry/regf.c regf->hbins[0] = NULL;
regf 1988 source4/lib/registry/regf.c sd = security_descriptor_dacl_create(regf,
regf 1998 source4/lib/registry/regf.c if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_struct_blob(&data, regf, NULL,
regf 2013 source4/lib/registry/regf.c regf->header->data_offset = hbin_store_tdr(regf,
regf 2017 source4/lib/registry/regf.c sk_offset = hbin_store_tdr(regf,
regf 2026 source4/lib/registry/regf.c *key = (struct hive_key *)regf_get_key(parent_ctx, regf,
regf 2027 source4/lib/registry/regf.c regf->header->data_offset);
regf 2029 source4/lib/registry/regf.c error = regf_save_hbin(regf);
regf 2035 source4/lib/registry/regf.c talloc_free(regf);
regf 2043 source4/lib/registry/regf.c struct regf_data *regf;
regf 2048 source4/lib/registry/regf.c regf = (struct regf_data *)talloc_zero(parent_ctx, struct regf_data);
regf 2050 source4/lib/registry/regf.c regf->iconv_convenience = iconv_convenience;
regf 2052 source4/lib/registry/regf.c W_ERROR_HAVE_NO_MEMORY(regf);
regf 2057 source4/lib/registry/regf.c regf->fd = open(location, O_RDWR);
regf 2059 source4/lib/registry/regf.c if (regf->fd == -1) {
regf 2062 source4/lib/registry/regf.c talloc_free(regf);
regf 2066 source4/lib/registry/regf.c pull = tdr_pull_init(regf, regf->iconv_convenience);
regf 2068 source4/lib/registry/regf.c pull->data.data = (uint8_t*)fd_load(regf->fd, &pull->data.length, 0, regf);
regf 2072 source4/lib/registry/regf.c talloc_free(regf);
regf 2076 source4/lib/registry/regf.c regf_hdr = talloc(regf, struct regf_hdr);
regf 2080 source4/lib/registry/regf.c talloc_free(regf);
regf 2084 source4/lib/registry/regf.c regf->header = regf_hdr;
regf 2089 source4/lib/registry/regf.c talloc_free(regf);
regf 2098 source4/lib/registry/regf.c talloc_free(regf);
regf 2106 source4/lib/registry/regf.c regf->hbins = talloc_array(regf, struct hbin_block *, 1);
regf 2107 source4/lib/registry/regf.c W_ERROR_HAVE_NO_MEMORY(regf->hbins);
regf 2109 source4/lib/registry/regf.c regf->hbins[0] = NULL;
regf 2112 source4/lib/registry/regf.c pull->offset <= regf->header->last_block) {
regf 2113 source4/lib/registry/regf.c struct hbin_block *hbin = talloc(regf->hbins,
regf 2120 source4/lib/registry/regf.c talloc_free(regf);
regf 2127 source4/lib/registry/regf.c talloc_free(regf);
regf 2131 source4/lib/registry/regf.c regf->hbins[i] = hbin;
regf 2133 source4/lib/registry/regf.c regf->hbins = talloc_realloc(regf, regf->hbins,
regf 2135 source4/lib/registry/regf.c regf->hbins[i] = NULL;
regf 2142 source4/lib/registry/regf.c *key = (struct hive_key *)regf_get_key(parent_ctx, regf,
regf 2143 source4/lib/registry/regf.c regf->header->data_offset);
regf 2146 source4/lib/registry/regf.c talloc_free(regf);