svn commit: samba r23421 - in branches/SAMBA_3_0_26/source: include lib libmsrpc

obnox at samba.org obnox at samba.org
Mon Jun 11 14:47:06 GMT 2007


Author: obnox
Date: 2007-06-11 14:47:05 +0000 (Mon, 11 Jun 2007)
New Revision: 23421

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23421

Log:
Merge parts of r18963 that apply:

Move defines from rpc_reg.h to reg_object.h.
rpc_reg.h is not completely removed, since not all of
the hand-marshalled code is replaced by ndr code in 3_0_26.

Michael


Modified:
   branches/SAMBA_3_0_26/source/include/reg_objects.h
   branches/SAMBA_3_0_26/source/include/rpc_reg.h
   branches/SAMBA_3_0_26/source/lib/util_reg.c
   branches/SAMBA_3_0_26/source/libmsrpc/libmsrpc_internal.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/include/reg_objects.h
===================================================================
--- branches/SAMBA_3_0_26/source/include/reg_objects.h	2007-06-11 14:41:14 UTC (rev 23420)
+++ branches/SAMBA_3_0_26/source/include/reg_objects.h	2007-06-11 14:47:05 UTC (rev 23421)
@@ -46,5 +46,73 @@
 	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 */
 

Modified: branches/SAMBA_3_0_26/source/include/rpc_reg.h
===================================================================
--- branches/SAMBA_3_0_26/source/include/rpc_reg.h	2007-06-11 14:41:14 UTC (rev 23420)
+++ branches/SAMBA_3_0_26/source/include/rpc_reg.h	2007-06-11 14:47:05 UTC (rev 23421)
@@ -53,25 +53,6 @@
 #define REG_SHUTDOWN_EX		0x1e
 
 
-#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_HKCR		"HKCR"
-#define KEY_HKPD		"HKPD"
-#define KEY_HKPT		"HKPT"
-#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 data types */
 
 #define REG_NONE                       0
@@ -88,45 +69,6 @@
 #define REG_RESOURCE_REQUIREMENTS_LIST 10
 
 /*
- * 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;
-
-/*
  * RPC REGISTRY STRUCTURES
  */
 

Modified: branches/SAMBA_3_0_26/source/lib/util_reg.c
===================================================================
--- branches/SAMBA_3_0_26/source/lib/util_reg.c	2007-06-11 14:41:14 UTC (rev 23420)
+++ branches/SAMBA_3_0_26/source/lib/util_reg.c	2007-06-11 14:47:05 UTC (rev 23421)
@@ -40,8 +40,8 @@
 	case REG_DWORD:
 		result = "REG_DWORD";
 		break;
-	case REG_DWORD_BE:
-		result = "REG_DWORD_BE";
+	case REG_DWORD_BIG_ENDIAN:
+		result = "REG_DWORD_BIG_ENDIAN";
 		break;
 	case REG_LINK:
 		result = "REG_LINK";

Modified: branches/SAMBA_3_0_26/source/libmsrpc/libmsrpc_internal.c
===================================================================
--- branches/SAMBA_3_0_26/source/libmsrpc/libmsrpc_internal.c	2007-06-11 14:41:14 UTC (rev 23420)
+++ branches/SAMBA_3_0_26/source/libmsrpc/libmsrpc_internal.c	2007-06-11 14:47:05 UTC (rev 23421)
@@ -133,7 +133,7 @@
 		init_rpc_blob_uint32( blob, data.reg_dword );
 		break;
 
-	case REG_DWORD_BE:
+	case REG_DWORD_BIG_ENDIAN:
 		init_rpc_blob_uint32( blob, data.reg_dword_be );
 		break;
 
@@ -281,7 +281,7 @@
 		data->reg_dword = *( ( uint32 * ) buf.buffer );
 		break;
 
-	case REG_DWORD_BE:
+	case REG_DWORD_BIG_ENDIAN:
 		data->reg_dword_be = *( ( uint32 * ) buf.buffer );
 		break;
 



More information about the samba-cvs mailing list