summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/adt_tree.h38
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/rpc_reg.h43
3 files changed, 79 insertions, 3 deletions
diff --git a/source3/include/adt_tree.h b/source3/include/adt_tree.h
new file mode 100644
index 0000000000..b1bf7ad85d
--- /dev/null
+++ b/source3/include/adt_tree.h
@@ -0,0 +1,38 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * Generic Abstract Data Types
+ * Copyright (C) Gerald Carter 2002.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef ADT_TREE_H
+#define ADT_TREE_H
+
+typedef struct _tree_node {
+ struct _tree_node *parent;
+ struct _tree_node **children;
+ int num_children;
+ char *key;
+ void *data_p;
+} TREE_NODE;
+
+typedef struct _tree_root {
+ TREE_NODE *root;
+ int (*compare)(void* x, void *y);
+ void (*free)(void *p);
+} SORTED_TREE;
+
+#endif
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 435810a1ba..04d11afafb 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -710,6 +710,7 @@ extern int errno;
#include "messages.h"
#include "charset.h"
#include "dynconfig.h"
+#include "adt_tree.h"
#include "util_getent.h"
diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h
index 8ebfc888ed..9c5f614f91 100644
--- a/source3/include/rpc_reg.h
+++ b/source3/include/rpc_reg.h
@@ -65,6 +65,7 @@
#define KEY_HKLM "HKLM"
#define KEY_HKU "HKU"
+#define KEY_PRINTING "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print"
/* Registry data types */
@@ -86,16 +87,52 @@
#define REG_FORCE_SHUTDOWN 0x001
#define REG_REBOOT_ON_SHUTDOWN 0x100
+/* structure to contain registry values */
+
+typedef struct _RegistryValue {
+ fstring valuename;
+ uint16 type;
+ uint32 size; /* in bytes */
+ union {
+ char *string;
+ uint32 dword;
+ uint8 *binary;
+ } data;
+} REGISTRY_VALUE;
+
+
+/*
+ * container for function pointers to enumeration routines
+ * for vitural registry view
+ */
+
+typedef struct _reg_ops {
+ /* functions for enumerating subkeys and values */
+ int (*subkey_fn)( char *key, char **subkeys );
+ int (*subkey_specific_fn)( char *key, char** subkey, uint32 index );
+ int (*value_fn) ( char *key, REGISTRY_VALUE **val );
+ BOOL (*store_subkeys_fn)( char *key, char **subkeys, uint32 num_subkeys );
+ BOOL (*store_values_fn)( char *key, REGISTRY_VALUE **val, uint32 num_values );
+} REGISTRY_OPS;
+
+typedef struct _reg_hook {
+ char *keyname; /* full path to name of key */
+ REGISTRY_OPS *ops; /* registry function hooks */
+} REGISTRY_HOOK;
+
+
+
/* structure to store the registry handles */
typedef struct _RegistryKey {
struct _RegistryKey *prev, *next;
- fstring name; /* name of registry key */
POLICY_HND hnd;
+ fstring name; /* full name of registry key */
+ REGISTRY_HOOK *hook;
-} Registry_Key;
+} REGISTRY_KEY;
/* REG_Q_OPEN_HKCR */
@@ -123,7 +160,7 @@ typedef struct q_reg_open_hklm_info
uint32 ptr;
uint16 unknown_0; /* 0xE084 - 16 bit unknown */
uint16 unknown_1; /* random. changes */
- uint32 access_mask; /* 0x0000 0002 - 32 bit unknown */
+ uint32 access_mask;
}
REG_Q_OPEN_HKLM;