diff options
author | Gerald Carter <jerry@samba.org> | 2002-07-20 13:23:57 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-07-20 13:23:57 +0000 |
commit | 6dd9f24d05e5db92e15dc53399a0f78ccb69f718 (patch) | |
tree | 234454eee6950cf09745f658eebad80756ef6590 /source3/rpc_server | |
parent | 29075c97d3b7111e2565ede1cd0f000fd2534375 (diff) | |
download | samba-6dd9f24d05e5db92e15dc53399a0f78ccb69f718.tar.gz samba-6dd9f24d05e5db92e15dc53399a0f78ccb69f718.tar.bz2 samba-6dd9f24d05e5db92e15dc53399a0f78ccb69f718.zip |
another intermediate checkin on the way to enumerating forms
via the registry. There is a seg fault here which shouldn't
bother anyone until I can get it fixed. I just need
a check point in case I need to roll back to this version later on.
(This used to be commit e62ae94823461e142978a786b2860ea97906cfb3)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_reg_nt.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 580ab78f74..72e0631e8b 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -219,34 +219,35 @@ static BOOL get_subkey_information( REGISTRY_KEY *key, uint32 *maxnum, uint32 *m static BOOL get_value_information( REGISTRY_KEY *key, uint32 *maxnum, uint32 *maxlen, uint32 *maxsize ) { - REGVAL_CTR val; + REGVAL_CTR values; + REGISTRY_VALUE *val; uint32 sizemax, lenmax; - int num_values; + int i, num_values; if ( !key ) return False; ZERO_STRUCTP( &val ); - regval_ctr_init( &val ); + regval_ctr_init( &values ); - if ( fetch_reg_values( key, &val ) == -1 ) + if ( fetch_reg_values( key, &values ) == -1 ) return False; lenmax = sizemax = 0; - num_values = regval_ctr_numvals( &val ); + num_values = regval_ctr_numvals( &values ); -#if 0 /* JERRY */ - for ( i=0; i<num_values; i++ ) { + for ( i=0; i<num_values && val; i++ ) { + val = regval_ctr_specific_value( &values, i ); lenmax = MAX(lenmax, strlen(val[i].valuename)+1 ); sizemax = MAX(sizemax, val[i].size ); } -#endif + *maxnum = num_values; *maxlen = lenmax; *maxsize = sizemax; - regval_ctr_destroy( &val ); + regval_ctr_destroy( &values ); return True; } |