summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-07-08 01:06:38 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-07-08 01:06:38 +0000
commitb2be8917e0af1883405cc190357b3e1e0ccd7683 (patch)
treefce9a8bc5a18af0d304666b7ea192fd7bf80d63a
parent8dc39c1112487a7c98cd48ebe9742af07fd3e1c6 (diff)
downloadsamba-b2be8917e0af1883405cc190357b3e1e0ccd7683.tar.gz
samba-b2be8917e0af1883405cc190357b3e1e0ccd7683.tar.bz2
samba-b2be8917e0af1883405cc190357b3e1e0ccd7683.zip
Jerry: Sorry if I am stepping on toes here, but this should fix the compile on
solaris CC (void* arithmatic) and fixes the other warnings (global variable shadows) that gcc has with this file. Andrew Bartlett (This used to be commit 7ac6517bec0f425f99f419f6efd2a673b4ec0f83)
-rw-r--r--source3/rpc_server/srv_reg_nt.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index 1960ebc821..3f07e4aaea 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -58,7 +58,7 @@ static TDB_CONTEXT *tdb_reg;
static BOOL store_reg_keys( TDB_CONTEXT *tdb, char *keyname, char **subkeys, uint32 num_subkeys )
{
TDB_DATA kbuf, dbuf;
- void *buffer, *tmpbuf;
+ char *buffer, *tmpbuf;
int i = 0;
uint32 len, buflen;
BOOL ret = True;
@@ -121,7 +121,7 @@ static int fetch_reg_keys( TDB_CONTEXT *tdb, char* key, char **subkeys )
pstring path;
uint32 num_items;
TDB_DATA dbuf;
- void *buf;
+ char *buf;
uint32 buflen, len;
int i;
char *s;
@@ -172,7 +172,7 @@ static int fetch_reg_keys_count( TDB_CONTEXT *tdb, char* key )
pstring path;
uint32 num_items;
TDB_DATA dbuf;
- void *buf;
+ char *buf;
uint32 buflen, len;
@@ -203,7 +203,8 @@ static int fetch_reg_keys_count( TDB_CONTEXT *tdb, char* key )
is assumed to be an fstring.
***********************************************************************/
-static BOOL fetch_reg_keys_specific( TDB_CONTEXT *tdb, char* key, char* subkey, uint32 index )
+static BOOL fetch_reg_keys_specific( TDB_CONTEXT *tdb, char* key, char* subkey,
+ uint32 key_index )
{
int num_subkeys, i;
char *subkeys = NULL;
@@ -216,7 +217,7 @@ static BOOL fetch_reg_keys_specific( TDB_CONTEXT *tdb, char* key, char* subkey,
s = subkeys;
for ( i=0; i<num_subkeys; i++ ) {
/* copy the key if the index matches */
- if ( i == index ) {
+ if ( i == key_index ) {
fstrcpy( subkey, s );
break;
}
@@ -235,7 +236,7 @@ static BOOL fetch_reg_keys_specific( TDB_CONTEXT *tdb, char* key, char* subkey,
Open the registry database
***********************************************************************/
-static BOOL init_registry_data( TDB_CONTEXT* tdb_reg )
+static BOOL init_registry_data( TDB_CONTEXT* registry_tdb )
{
pstring keyname;
char *subkeys[3];
@@ -244,27 +245,27 @@ static BOOL init_registry_data( TDB_CONTEXT* tdb_reg )
pstrcpy( keyname, KEY_HKLM );
subkeys[0] = "SYSTEM";
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 1 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 1 ))
return False;
pstrcpy( keyname, KEY_HKLM );
pstrcat( keyname, "/SYSTEM" );
subkeys[0] = "CurrentControlSet";
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 1 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 1 ))
return False;
pstrcpy( keyname, KEY_HKLM );
pstrcat( keyname, "/SYSTEM/CurrentControlSet" );
subkeys[0] = "Control";
subkeys[1] = "services";
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 2 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 2 ))
return False;
pstrcpy( keyname, KEY_HKLM );
pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control" );
subkeys[0] = "Print";
subkeys[1] = "ProduceOptions";
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 2 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 2 ))
return False;
pstrcpy( keyname, KEY_HKLM );
@@ -272,36 +273,36 @@ static BOOL init_registry_data( TDB_CONTEXT* tdb_reg )
subkeys[0] = "Environments";
subkeys[1] = "Forms";
subkeys[2] = "Printers";
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 3 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 3 ))
return False;
pstrcpy( keyname, KEY_HKLM );
pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control/ProductOptions" );
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 0 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 0 ))
return False;
pstrcpy( keyname, KEY_HKLM );
pstrcat( keyname, "/SYSTEM/CurrentControlSet/services" );
subkeys[0] = "Netlogon";
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 1 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 1 ))
return False;
pstrcpy( keyname, KEY_HKLM );
pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon" );
subkeys[0] = "parameters";
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 1 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 1 ))
return False;
pstrcpy( keyname, KEY_HKLM );
pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon/parameters" );
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 0 ))
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 0 ))
return False;
/* HKEY_USER */
pstrcpy( keyname, KEY_HKU );
- if ( !store_reg_keys( tdb_reg, keyname, subkeys, 0 ) )
+ if ( !store_reg_keys( registry_tdb, keyname, subkeys, 0 ) )
return False;
return True;