summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-04 14:47:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:30 -0500
commitff7342a4ad1cc1ac8571c86466c197b6a8fa6b41 (patch)
tree5e1ea481ad2fd2a0f47b62a64cbeac60b123bb2f /source4/lib/registry/tools
parent4729c3db26f719cd936825d91b2514df7ac0e61b (diff)
downloadsamba-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')
-rw-r--r--source4/lib/registry/tools/regdiff.c2
-rw-r--r--source4/lib/registry/tools/regpatch.c2
-rw-r--r--source4/lib/registry/tools/regshell.c16
-rw-r--r--source4/lib/registry/tools/regtree.c2
4 files changed, 17 insertions, 5 deletions
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c
index 307ec3793e..3d8201330e 100644
--- a/source4/lib/registry/tools/regdiff.c
+++ b/source4/lib/registry/tools/regdiff.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "dynconfig.h"
-#include "registry.h"
+#include "lib/registry/registry.h"
#include "lib/cmdline/popt_common.h"
static void writediff(struct registry_key *oldkey, struct registry_key *newkey, FILE *out)
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c
index 5f7d4376d4..887f53df37 100644
--- a/source4/lib/registry/tools/regpatch.c
+++ b/source4/lib/registry/tools/regpatch.c
@@ -22,7 +22,7 @@
#include "includes.h"
#include "dynconfig.h"
-#include "registry.h"
+#include "lib/registry/registry.h"
#include "lib/cmdline/popt_common.h"
#include "system/filesys.h"
#include "librpc/gen_ndr/winreg.h"
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;
}
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 38dffed85d..c24e66412f 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "dynconfig.h"
-#include "registry.h"
+#include "lib/registry/registry.h"
#include "lib/cmdline/popt_common.h"
static void print_tree(int l, struct registry_key *p, int fullpath, int novals)