summaryrefslogtreecommitdiff
path: root/source3/registry/reg_frontend_hilvl.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-14 18:31:11 +0100
committerGünther Deschner <gd@samba.org>2008-01-14 19:38:01 +0100
commitd35bda0ffd5bea57087dba9a6da8c20df8fa165c (patch)
tree40be9067b2d4fb2090d53c1da1466848d47e0af3 /source3/registry/reg_frontend_hilvl.c
parent36a7316bfc9d7582ccd908f2b9d96e0fe983e884 (diff)
downloadsamba-d35bda0ffd5bea57087dba9a6da8c20df8fa165c.tar.gz
samba-d35bda0ffd5bea57087dba9a6da8c20df8fa165c.tar.bz2
samba-d35bda0ffd5bea57087dba9a6da8c20df8fa165c.zip
Add detection for need of update to the registry db.
This only detects if the tdb sequence number has changed since the data has last been read. Michael (This used to be commit 3f081ebeadf30a7943723703ecae479e0412c60c)
Diffstat (limited to 'source3/registry/reg_frontend_hilvl.c')
-rw-r--r--source3/registry/reg_frontend_hilvl.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/registry/reg_frontend_hilvl.c b/source3/registry/reg_frontend_hilvl.c
index a4b78b24c0..73fcf87e17 100644
--- a/source3/registry/reg_frontend_hilvl.c
+++ b/source3/registry/reg_frontend_hilvl.c
@@ -214,3 +214,32 @@ WERROR regkey_set_secdesc(REGISTRY_KEY *key,
return WERR_ACCESS_DENIED;
}
+
+/**
+ * Check whether the in-memory version of the subkyes of a
+ * registry key needs update from disk.
+ */
+bool reg_subkeys_need_update(REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys)
+{
+ if (key->hook && key->hook->ops && key->hook->ops->subkeys_need_update)
+ {
+ return key->hook->ops->subkeys_need_update(subkeys);
+ }
+
+ return false;
+}
+
+/**
+ * Check whether the in-memory version of the values of a
+ * registry key needs update from disk.
+ */
+bool reg_values_need_update(REGISTRY_KEY *key, REGVAL_CTR *values)
+{
+ if (key->hook && key->hook->ops && key->hook->ops->values_need_update)
+ {
+ return key->hook->ops->values_need_update(values);
+ }
+
+ return false;
+}
+