svn commit: samba r6756 - in trunk/source: include registry utils

jerry at samba.org jerry at samba.org
Thu May 12 13:12:48 GMT 2005


Author: jerry
Date: 2005-05-12 13:12:48 +0000 (Thu, 12 May 2005)
New Revision: 6756

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

Log:
a few more registry fixes....getting closer; need to write security descriptors next
Modified:
   trunk/source/include/regfio.h
   trunk/source/registry/regfio.c
   trunk/source/utils/net_rpc_registry.c


Changeset:
Modified: trunk/source/include/regfio.h
===================================================================
--- trunk/source/include/regfio.h	2005-05-12 13:09:33 UTC (rev 6755)
+++ trunk/source/include/regfio.h	2005-05-12 13:12:48 UTC (rev 6756)
@@ -202,7 +202,7 @@
 REGF_NK_REC*  regfio_fetch_subkey( REGF_FILE *file, REGF_NK_REC *nk );
 REGF_NK_REC*  regfio_write_key ( REGF_FILE *file, const char *name,
                                  REGVAL_CTR *values, REGSUBKEY_CTR *subkeys,
-                                 REGF_NK_REC *parent );
+                                 SEC_DESC *sec_desc, REGF_NK_REC *parent );
 
 
 #endif	/* _REGFIO_H */

Modified: trunk/source/registry/regfio.c
===================================================================
--- trunk/source/registry/regfio.c	2005-05-12 13:09:33 UTC (rev 6755)
+++ trunk/source/registry/regfio.c	2005-05-12 13:12:48 UTC (rev 6756)
@@ -276,6 +276,7 @@
 	uint16 class_length, name_length;
 	uint32 start;
 	uint32 data_size, start_off, end_off;
+	uint32 unknown_off = REGF_OFFSET_NONE;
 
 	nk->hbin_off = prs_offset( ps );
 	start = nk->hbin_off;
@@ -310,6 +311,8 @@
 		return False;
 	if ( !prs_uint32( "subkeys_off", ps, depth, &nk->subkeys_off ))
 		return False;
+	if ( !prs_uint32( "unknown_off", ps, depth, &unknown_off) )
+		return False;
 		
 	if ( !prs_set_offset( ps, start+0x0024 ) )
 		return False;
@@ -1066,7 +1069,7 @@
 	
 	/* hard coded values...no diea what these are ... maybe in time */
 	
-	file->unknown1 = 0x1;
+	file->unknown1 = 0x2;
 	file->unknown2 = 0x1;
 	file->unknown3 = 0x3;
 	file->unknown4 = 0x0;
@@ -1353,6 +1356,8 @@
 	if ( !write_hbin_block( file, hbin ) )
 		return NULL;
 
+	file->last_block = hbin->file_off;
+
 	return hbin;
 }
 
@@ -1566,7 +1571,7 @@
 
 REGF_NK_REC* regfio_write_key( REGF_FILE *file, const char *name, 
                                REGVAL_CTR *values, REGSUBKEY_CTR *subkeys, 
-                               REGF_NK_REC *parent )
+                               SEC_DESC *secdesc, REGF_NK_REC *parent )
 {
 	REGF_NK_REC *nk;
 	REGF_HBIN *vlist_hbin;

Modified: trunk/source/utils/net_rpc_registry.c
===================================================================
--- trunk/source/utils/net_rpc_registry.c	2005-05-12 13:09:33 UTC (rev 6755)
+++ trunk/source/utils/net_rpc_registry.c	2005-05-12 13:12:48 UTC (rev 6756)
@@ -359,7 +359,7 @@
 		regsubkey_ctr_addkey( &subkeys, subkey->keyname );
 	}
 	
-	key = regfio_write_key( outfile, nk->keyname, &values, &subkeys, parent );
+	key = regfio_write_key( outfile, nk->keyname, &values, &subkeys, nk->sec_desc->sec_desc, parent );
 
 	/* write each one of the subkeys out */
 



More information about the samba-cvs mailing list