From eac7fe4ebc6eb819fe3721051751e60b12e95684 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 3 Sep 2005 23:23:14 +0000 Subject: r10016: Support reading security descriptors on keys. (This used to be commit b349e902c7b0140cd94e241ba9f81c83fa54f603) --- source4/lib/registry/tools/regtree.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4/lib/registry/tools') diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c index 2385123b7f..38dffed85d 100644 --- a/source4/lib/registry/tools/regtree.c +++ b/source4/lib/registry/tools/regtree.c @@ -28,6 +28,7 @@ static void print_tree(int l, struct registry_key *p, int fullpath, int novals) { struct registry_key *subkey; struct registry_value *value; + struct security_descriptor *sec_desc; WERROR error; int i; TALLOC_CTX *mem_ctx; @@ -68,9 +69,15 @@ static void print_tree(int l, struct registry_key *p, int fullpath, int novals) DEBUG(0, ("Error occured while fetching values for '%s': %s\n", p->path, win_errstr(error))); } } + + mem_ctx = talloc_init("sec_desc"); + if (NT_STATUS_IS_ERR(reg_get_sec_desc(mem_ctx, p, &sec_desc))) { + DEBUG(0, ("Error getting security descriptor\n")); + } + talloc_free(mem_ctx); } - int main(int argc, char **argv) +int main(int argc, char **argv) { int opt, i; const char *backend = NULL; -- cgit