diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-24 22:34:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:58:01 -0500 |
commit | b8e787bcac79b01d3f44d497517138b0c013be00 (patch) | |
tree | f83b5bb7b6e03072bce7dc35015428896a7b5c0d /source3/registry | |
parent | 292d11bee56c5493f0c1a9e9e2078bd582704874 (diff) | |
download | samba-b8e787bcac79b01d3f44d497517138b0c013be00.tar.gz samba-b8e787bcac79b01d3f44d497517138b0c013be00.tar.bz2 samba-b8e787bcac79b01d3f44d497517138b0c013be00.zip |
r7890: * add Reg[SG]etKeySec() server stubs
* merge a compile warning fix from trunk to SAMBA_3_0
(This used to be commit 71eb018a05c5012fbd42ba6817aabc0797d38ba1)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_db.c | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 1ae1d6be54..af0a30b76c 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -56,6 +56,22 @@ static const char *builtin_registry_paths[] = { "HKCR", NULL }; +#if 0 /* not used yet */ +struct builtin_regkey_value { + const char *path; + const char *valuename; + uint32 type; + union { + const char *string; + uint32 dw_value; + } data; +}; + +static struct builtin_regkey_value builtin_values[] = { + { "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot", REG_SZ, { "c:\\Windows" } }, +}; +#endif + #define REGVER_V1 1 /* first db version with write support */ /*********************************************************************** @@ -356,38 +372,10 @@ static int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) static int regdb_fetch_reg_values( char* key, REGVAL_CTR *val ) { - UNISTR2 data; - int num_vals; - char *hname; - fstring mydomainname; + int num_vals = 0; DEBUG(10,("regdb_fetch_reg_values: Looking for value of key [%s] \n", key)); - num_vals = 0; - - if ( strequal(key, "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" ) ) { - DEBUG(10,("regdb_fetch_reg_values: Supplying SystemRoot \n")); - init_unistr2( &data, "c:\\Windows", UNI_STR_TERMINATE); - regval_ctr_addvalue( val, "SystemRoot",REG_SZ, (char*)data.buffer, data.uni_str_len*sizeof(uint16) ); - num_vals = 1; - } else if ( strequal(key, "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" ) ) { - DEBUG(10,("regdb_fetch_reg_values: Supplying ProductType \n")); - init_unistr2( &data, "WinNT", UNI_STR_TERMINATE); - regval_ctr_addvalue( val, "ProductType",REG_SZ, (char*)data.buffer, data.uni_str_len*sizeof(uint16) ); - num_vals = 1; - } else if ( strequal(key, "HKLM\\System\\CurrentControlSet\\Services\\Tcpip\\Parameters" ) ) { - DEBUG(10,("regdb_fetch_reg_values: Supplying Hostname & Domain Name\n")); - hname = SMB_STRDUP(myhostname()); - get_mydnsdomname(mydomainname); - init_unistr2( &data, hname, UNI_STR_TERMINATE); - regval_ctr_addvalue( val, "Hostname",REG_SZ, (char*)data.buffer, data.uni_str_len*sizeof(uint16) ); - init_unistr2( &data, mydomainname, UNI_STR_TERMINATE); - regval_ctr_addvalue( val, "Domain",REG_SZ, (char*)data.buffer, data.uni_str_len*sizeof(uint16) ); - num_vals = 2; - } - - - return num_vals; } |