summaryrefslogtreecommitdiff
path: root/source3/include/reg_objects.h
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-27 19:03:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:51 -0500
commit2326b147d03102cb7077aa7c8246b6515060284a (patch)
tree8e74cc7795a5caabab494464fc16c0053d645602 /source3/include/reg_objects.h
parentb3ec4697ef153aec4ac2fc95ee4781b757a7a9ac (diff)
downloadsamba-2326b147d03102cb7077aa7c8246b6515060284a.tar.gz
samba-2326b147d03102cb7077aa7c8246b6515060284a.tar.bz2
samba-2326b147d03102cb7077aa7c8246b6515060284a.zip
r18963: * Move parts of registry headers that were still in
use to reg_objects.h * Remove unused rpc headers (This used to be commit 4f79d8c83db5af80078114e9fb39171380d040b1)
Diffstat (limited to 'source3/include/reg_objects.h')
-rw-r--r--source3/include/reg_objects.h73
1 files changed, 71 insertions, 2 deletions
diff --git a/source3/include/reg_objects.h b/source3/include/reg_objects.h
index fff6fa16f7..09f124f1c8 100644
--- a/source3/include/reg_objects.h
+++ b/source3/include/reg_objects.h
@@ -1,7 +1,8 @@
/*
- Unix SMB/CIFS implementation.
+ Samba's Internal Registry objects
+
SMB parameters and setup
- Copyright (C) Gerald Carter 2002-2005.
+ Copyright (C) Gerald Carter 2002-2006.
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
@@ -45,5 +46,73 @@ typedef struct {
char **subkeys;
} REGSUBKEY_CTR;
+/*
+ *
+ * Macros that used to reside in rpc_reg.h
+ *
+ */
+
+#define HKEY_CLASSES_ROOT 0x80000000
+#define HKEY_CURRENT_USER 0x80000001
+#define HKEY_LOCAL_MACHINE 0x80000002
+#define HKEY_USERS 0x80000003
+#define HKEY_PERFORMANCE_DATA 0x80000004
+
+#define KEY_HKLM "HKLM"
+#define KEY_HKU "HKU"
+#define KEY_HKCC "HKCC"
+#define KEY_HKCR "HKCR"
+#define KEY_HKPD "HKPD"
+#define KEY_HKPT "HKPT"
+#define KEY_HKPN "HKPN"
+#define KEY_HKCU "HKCU"
+#define KEY_HKDD "HKDD"
+#define KEY_SERVICES "HKLM\\SYSTEM\\CurrentControlSet\\Services"
+#define KEY_PRINTING "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print"
+#define KEY_PRINTING_2K "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Printers"
+#define KEY_PRINTING_PORTS "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Ports"
+#define KEY_EVENTLOG "HKLM\\SYSTEM\\CurrentControlSet\\Services\\Eventlog"
+#define KEY_SHARES "HKLM\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Shares"
+#define KEY_TREE_ROOT ""
+
+/*
+ * Registry key types
+ * Most keys are going to be GENERIC -- may need a better name?
+ * HKPD and HKPT are used by reg_perfcount.c
+ * they are special keys that contain performance data
+ */
+#define REG_KEY_GENERIC 0
+#define REG_KEY_HKPD 1
+#define REG_KEY_HKPT 2
+
+/*
+ * container for function pointers to enumeration routines
+ * for virtual registry view
+ */
+
+typedef struct {
+ /* functions for enumerating subkeys and values */
+ int (*fetch_subkeys)( const char *key, REGSUBKEY_CTR *subkeys);
+ int (*fetch_values) ( const char *key, REGVAL_CTR *val );
+ BOOL (*store_subkeys)( const char *key, REGSUBKEY_CTR *subkeys );
+ BOOL (*store_values)( const char *key, REGVAL_CTR *val );
+ BOOL (*reg_access_check)( const char *keyname, uint32 requested, uint32 *granted, NT_USER_TOKEN *token );
+} REGISTRY_OPS;
+
+typedef struct {
+ const 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 {
+ uint32 type;
+ char *name; /* full name of registry key */
+ uint32 access_granted;
+ REGISTRY_HOOK *hook;
+} REGISTRY_KEY;
+
#endif /* _REG_OBJECTS_H */