summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2002-12-08 19:50:40 +0000
committerRichard Sharpe <sharpe@samba.org>2002-12-08 19:50:40 +0000
commitf3237d343e358cfdf8d3bf25de9a308b4fcfb935 (patch)
tree79b36506d3a65a4139a9e28ff861d859ea7ebf65 /source3/utils
parent98da55e97373735ee17ffd94997e12fc1ed03193 (diff)
downloadsamba-f3237d343e358cfdf8d3bf25de9a308b4fcfb935.tar.gz
samba-f3237d343e358cfdf8d3bf25de9a308b4fcfb935.tar.bz2
samba-f3237d343e358cfdf8d3bf25de9a308b4fcfb935.zip
Commit some more changes ... Start processing the sub-keys, recursively.
(This used to be commit bab2b240ec9a04b636c80599489746529cdd9d57)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/editreg.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/source3/utils/editreg.c b/source3/utils/editreg.c
index 07de8f4220..86e80e9b47 100644
--- a/source3/utils/editreg.c
+++ b/source3/utils/editreg.c
@@ -708,13 +708,22 @@ int valid_regf_hdr(REGF_HDR *regf_hdr)
}
/*
+ * Process an LF Header and return a list of sub-keys
+ */
+KEY_LIST *process_lf(REGF *regf, LF_HDR *lf_hdr, int size)
+{
+
+ return NULL;
+}
+
+/*
* This routine is passed a NK_HDR pointer and retrieves the entire tree
* from there down. It return a REG_KEY *.
*/
-REG_KEY *nt_get_key_tree(NK_HDR *nk_hdr, int size)
+REG_KEY *nt_get_key_tree(REGF *regf, NK_HDR *nk_hdr, int size)
{
- REG_KEY *tmp;
- int rec_size, name_len, clsname_len;
+ REG_KEY *tmp = NULL;
+ int rec_size, name_len, clsname_len, lf_off;
LF_HDR *lf_hdr;
VL_TYPE *vl;
char key_name[1024];
@@ -751,6 +760,23 @@ REG_KEY *nt_get_key_tree(NK_HDR *nk_hdr, int size)
fprintf(stderr, "Key name: %s\n", key_name);
+ lf_off = IVAL(&nk_hdr->lf_off);
+
+ /*
+ * No more subkeys if lf_off == -1
+ */
+
+ if (lf_off != -1) {
+
+ lf_hdr = (LF_HDR *)LOCN(regf->base, lf_off);
+
+ /* Should assign this to something */
+ process_lf(regf, lf_hdr, BLK_SIZE(lf_hdr));
+
+ }
+
+ return tmp;
+
}
int nt_load_registry(REGF *regf)
@@ -811,7 +837,7 @@ int nt_load_registry(REGF *regf)
* Now, get the registry tree by processing that NK recursively
*/
- regf->root = nt_get_key_tree(first_key, BLK_SIZE(first_key));
+ regf->root = nt_get_key_tree(regf, first_key, BLK_SIZE(first_key));
assert(regf->root != NULL);