diff options
author | Gerald Carter <jerry@samba.org> | 2002-07-23 04:55:06 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-07-23 04:55:06 +0000 |
commit | e8177d1104c8f7a1035f5c9c340ae5c9b594a729 (patch) | |
tree | 6fb8ca0c2ae68a9892f0ff38cfb4440b83205c3e /source3/rpc_server/srv_reg_nt.c | |
parent | 445a52ebb0cdbc5fff47559f70c2000283da9611 (diff) | |
download | samba-e8177d1104c8f7a1035f5c9c340ae5c9b594a729.tar.gz samba-e8177d1104c8f7a1035f5c9c340ae5c9b594a729.tar.bz2 samba-e8177d1104c8f7a1035f5c9c340ae5c9b594a729.zip |
* changed structure of REG_R_ENUM_VALUE structure since the BUFFER2
is not and [in/out] buffer
* registry value enumeration is working now for the Print\Forms
key. The format of the binary data is not quite right yet
but all installed forms are listed
(This used to be commit 998eb9c7312c3c9a9ed1e9ec294593503c0304bf)
Diffstat (limited to 'source3/rpc_server/srv_reg_nt.c')
-rw-r--r-- | source3/rpc_server/srv_reg_nt.c | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 72e0631e8b..99439bcc38 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -237,10 +237,14 @@ static BOOL get_value_information( REGISTRY_KEY *key, uint32 *maxnum, lenmax = sizemax = 0; num_values = regval_ctr_numvals( &values ); - for ( i=0; i<num_values && val; i++ ) { + val = regval_ctr_specific_value( &values, 0 ); + + for ( i=0; i<num_values && val; i++ ) + { + lenmax = MAX(lenmax, strlen(val->valuename)+1 ); + sizemax = MAX(sizemax, val->size ); + val = regval_ctr_specific_value( &values, i ); - lenmax = MAX(lenmax, strlen(val[i].valuename)+1 ); - sizemax = MAX(sizemax, val[i].size ); } *maxnum = num_values; @@ -480,6 +484,45 @@ done: return status; } +/***************************************************************************** + Implementation of REG_ENUM_VALUE + ****************************************************************************/ + +NTSTATUS _reg_enum_value(pipes_struct *p, REG_Q_ENUM_VALUE *q_u, REG_R_ENUM_VALUE *r_u) +{ + NTSTATUS status = NT_STATUS_OK; + REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); + REGISTRY_VALUE *val; + + + DEBUG(5,("_reg_enum_value: Enter\n")); + + if ( !regkey ) + return NT_STATUS_INVALID_HANDLE; + + DEBUG(8,("_reg_enum_key: enumerating values for key [%s]\n", regkey->name)); + + if ( !fetch_reg_values_specific( regkey, &val, q_u->val_index ) ) + { + status = NT_STATUS_NO_MORE_ENTRIES; + goto done; + } + + DEBUG(10,("_reg_enum_value: retrieved value named [%s]\n", val->valuename)); + + /* subkey has the string name now */ + + init_reg_r_enum_val( r_u, val ); + + + DEBUG(5,("_reg_enum_value: Exit\n")); + +done: + SAFE_FREE( val ); + + return status; +} + /******************************************************************* reg_shutdwon |