summaryrefslogtreecommitdiff
path: root/source4/lib/registry/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/interface.c')
-rw-r--r--source4/lib/registry/interface.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/lib/registry/interface.c b/source4/lib/registry/interface.c
index 4d75e99f00..4950e1dacd 100644
--- a/source4/lib/registry/interface.c
+++ b/source4/lib/registry/interface.c
@@ -275,3 +275,28 @@ _PUBLIC_ WERROR reg_key_flush(struct registry_key *key)
return key->context->ops->flush_key(key);
}
+
+_PUBLIC_ WERROR reg_get_security(TALLOC_CTX *mem_ctx,
+ const struct registry_key *key,
+ struct security_descriptor **security)
+{
+ if (key == NULL)
+ return WERR_INVALID_PARAM;
+
+ if (key->context->ops->get_security == NULL)
+ return WERR_NOT_SUPPORTED;
+
+ return key->context->ops->get_security(mem_ctx, key, security);
+}
+
+_PUBLIC_ WERROR reg_set_security(struct registry_key *key,
+ struct security_descriptor *security)
+{
+ if (key == NULL)
+ return WERR_INVALID_PARAM;
+
+ if (key->context->ops->set_security == NULL)
+ return WERR_NOT_SUPPORTED;
+
+ return key->context->ops->set_security(key, security);
+}