diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-09-04 14:47:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:36:30 -0500 |
commit | ff7342a4ad1cc1ac8571c86466c197b6a8fa6b41 (patch) | |
tree | 5e1ea481ad2fd2a0f47b62a64cbeac60b123bb2f /source4/lib/registry/tools/regshell.c | |
parent | 4729c3db26f719cd936825d91b2514df7ac0e61b (diff) | |
download | samba-ff7342a4ad1cc1ac8571c86466c197b6a8fa6b41.tar.gz samba-ff7342a4ad1cc1ac8571c86466c197b6a8fa6b41.tar.bz2 samba-ff7342a4ad1cc1ac8571c86466c197b6a8fa6b41.zip |
r10026: Move registry header file to lib/registry
Add support for showing security descriptor in regshell
Add support for saving files in NT4 registry backend
(This used to be commit 47cecd4726e6568f1aafb404646d2664f630a9bb)
Diffstat (limited to 'source4/lib/registry/tools/regshell.c')
-rw-r--r-- | source4/lib/registry/tools/regshell.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index 496b9dc7e5..08da5ae2fd 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -21,9 +21,10 @@ #include "includes.h" #include "dynconfig.h" -#include "registry.h" +#include "lib/registry/registry.h" #include "lib/cmdline/popt_common.h" #include "system/time.h" +#include "librpc/gen_ndr/ndr_security.h" /* * ck/cd - change key @@ -33,19 +34,30 @@ * mkkey/mkdir - make key * ch - change hive * info - show key info + * save - save hive * help * exit */ static struct registry_key *cmd_info(TALLOC_CTX *mem_ctx, struct registry_context *ctx,struct registry_key *cur, int argc, char **argv) { + struct security_descriptor *sec_desc = NULL; time_t last_mod; + WERROR error; + printf("Name: %s\n", cur->name); printf("Full path: %s\n", cur->path); printf("Key Class: %s\n", cur->class_name); last_mod = nt_time_to_unix(cur->last_mod); printf("Time Last Modified: %s\n", ctime(&last_mod)); - /* FIXME: Security info */ + + error = reg_get_sec_desc(mem_ctx, cur, &sec_desc); + if (!W_ERROR_IS_OK(error)) { + printf("Error getting security descriptor\n"); + } else { + ndr_print_debug((ndr_print_fn_t)ndr_print_security_descriptor, "Security", sec_desc); + } + talloc_free(sec_desc); return cur; } |