summaryrefslogtreecommitdiff
path: root/source4/lib/registry/local.c
diff options
context:
space:
mode:
authorWilco Baan Hofman <wilco@synlap.(none)>2008-04-14 22:52:51 +0200
committerWilco Baan Hofman <wilco@synlap.(none)>2008-04-14 22:52:51 +0200
commit12147fca2b3acd37eb20db82996714320cd4e9b2 (patch)
tree8744cccefb088a5d179978829df650ae5801c3ed /source4/lib/registry/local.c
parent212644b5a1107ad81e5ce3bc3118c8983d3f2a86 (diff)
downloadsamba-12147fca2b3acd37eb20db82996714320cd4e9b2.tar.gz
samba-12147fca2b3acd37eb20db82996714320cd4e9b2.tar.bz2
samba-12147fca2b3acd37eb20db82996714320cd4e9b2.zip
Add support for security descriptors. Also patched the regf backend to support this.
Did not touch the ldb, dir and rpc backends yet. (This used to be commit c4626f21a898da27a051f2c67f8fd73f55d4fc7d)
Diffstat (limited to 'source4/lib/registry/local.c')
-rw-r--r--source4/lib/registry/local.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c
index 5bf2d86588..da381cfbff 100644
--- a/source4/lib/registry/local.c
+++ b/source4/lib/registry/local.c
@@ -278,7 +278,21 @@ static WERROR local_get_key_info(TALLOC_CTX *mem_ctx,
last_change_time, max_subkeynamelen,
max_valnamelen, max_valbufsize);
}
+static WERROR local_get_sec_desc(TALLOC_CTX *mem_ctx,
+ const struct registry_key *key,
+ struct security_descriptor **security)
+{
+ const struct local_key *local = (const struct local_key *)key;
+ return hive_get_sec_desc(mem_ctx, local->hive_key, security);
+}
+static WERROR local_set_sec_desc(struct registry_key *key,
+ const struct security_descriptor *security)
+{
+ const struct local_key *local = (const struct local_key *)key;
+
+ return hive_set_sec_desc(local->hive_key, security);
+}
const static struct registry_operations local_ops = {
.name = "local",
.open_key = local_open_key,
@@ -292,6 +306,8 @@ const static struct registry_operations local_ops = {
.delete_value = local_delete_value,
.flush_key = local_flush_key,
.get_key_info = local_get_key_info,
+ .get_sec_desc = local_get_sec_desc,
+ .set_sec_desc = local_set_sec_desc,
};
WERROR reg_open_local(TALLOC_CTX *mem_ctx, struct registry_context **ctx,