2 * Unix SMB/CIFS implementation.
3 * Virtual Windows Registry Layer
4 * Copyright (C) Gerald Carter 2002-2005
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 /* Implementation of internal registry database functions. */
25 #define DBGC_CLASS DBGC_REGISTRY
27 static struct db_context
*regdb
= NULL
;
28 static int regdb_refcount
;
30 /* List the deepest path into the registry. All part components will be created.*/
32 /* If you want to have a part of the path controlled by the tdb and part by
33 a virtual registry db (e.g. printing), then you have to list the deepest path.
34 For example,"HKLM/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Print"
35 allows the reg_db backend to handle everything up to
36 "HKLM/SOFTWARE/Microsoft/Windows NT/CurrentVersion" and then we'll hook
37 the reg_printing backend onto the last component of the path (see
38 KEY_PRINTING_2K in include/rpc_reg.h) --jerry */
40 static const char *builtin_registry_paths
[] = {
49 "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors",
51 "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration",
60 struct builtin_regkey_value
{
62 const char *valuename
;
70 static struct builtin_regkey_value builtin_registry_values
[] = {
72 SAMBA_PRINTER_PORT_NAME
, REG_SZ
, { "" } },
74 "DefaultSpoolDirectory", REG_SZ
, { "C:\\Windows\\System32\\Spool\\Printers" } },
76 "DisplayName", REG_SZ
, { "Event Log" } },
78 "ErrorControl", REG_DWORD
, { (char*)0x00000001 } },
79 { NULL
, NULL
, 0, { NULL
} }
83 * Initialize a key in the registry:
84 * create each component key of the specified path.
86 static WERROR
init_registry_key_internal(const char *add_path
)
89 TALLOC_CTX
*frame
= talloc_stackframe();
92 char *remaining
= NULL
;
95 REGSUBKEY_CTR
*subkeys
;
98 DEBUG(6, ("init_registry_key: Adding [%s]\n", add_path
));
100 path
= talloc_strdup(frame
, add_path
);
101 base
= talloc_strdup(frame
, "");
102 if (!path
|| !base
) {
108 while (next_token_talloc(frame
, &p
, &keyname
, "\\")) {
110 /* build up the registry path from the components */
113 base
= talloc_asprintf(frame
, "%s\\", base
);
119 base
= talloc_asprintf_append(base
, "%s", keyname
);
125 /* get the immediate subkeyname (if we have one ) */
127 subkeyname
= talloc_strdup(frame
, "");
133 remaining
= talloc_strdup(frame
, p
);
140 if (!next_token_talloc(frame
, &p2
,
143 subkeyname
= talloc_strdup(frame
,p2
);
151 DEBUG(10,("init_registry_key: Storing key [%s] with "
152 "subkey [%s]\n", base
,
153 *subkeyname
? subkeyname
: "NULL"));
155 /* we don't really care if the lookup succeeds or not
156 * since we are about to update the record.
157 * We just want any subkeys already present */
159 if (!(subkeys
= TALLOC_ZERO_P(frame
, REGSUBKEY_CTR
))) {
160 DEBUG(0,("talloc() failure!\n"));
165 regdb_fetch_keys(base
, subkeys
);
167 werr
= regsubkey_ctr_addkey(subkeys
, subkeyname
);
168 if (!W_ERROR_IS_OK(werr
)) {
172 if (!regdb_store_keys( base
, subkeys
)) {
173 werr
= WERR_CAN_NOT_COMPLETE
;
186 * Initialize a key in the registry:
187 * create each component key of the specified path,
188 * wrapped in one db transaction.
190 WERROR
init_registry_key(const char *add_path
)
194 if (regdb
->transaction_start(regdb
) != 0) {
195 DEBUG(0, ("init_registry_key: transaction_start failed\n"));
196 return WERR_REG_IO_FAILURE
;
199 werr
= init_registry_key_internal(add_path
);
200 if (!W_ERROR_IS_OK(werr
)) {
204 if (regdb
->transaction_commit(regdb
) != 0) {
205 DEBUG(0, ("init_registry_key: Could not commit transaction\n"));
206 return WERR_REG_IO_FAILURE
;
212 if (regdb
->transaction_cancel(regdb
) != 0) {
213 smb_panic("init_registry_key: transaction_cancel failed\n");
219 /***********************************************************************
220 Open the registry data in the tdb
221 ***********************************************************************/
223 WERROR
init_registry_data(void)
226 TALLOC_CTX
*frame
= NULL
;
232 * There are potentially quite a few store operations which are all
233 * indiviually wrapped in tdb transactions. Wrapping them in a single
234 * transaction gives just a single transaction_commit() to actually do
235 * its fsync()s. See tdb/common/transaction.c for info about nested
236 * transaction behaviour.
239 if (regdb
->transaction_start(regdb
) != 0) {
240 DEBUG(0, ("init_registry_data: tdb_transaction_start "
242 return WERR_REG_IO_FAILURE
;
245 /* loop over all of the predefined paths and add each component */
247 for (i
=0; builtin_registry_paths
[i
] != NULL
; i
++) {
248 werr
= init_registry_key_internal(builtin_registry_paths
[i
]);
249 if (!W_ERROR_IS_OK(werr
)) {
254 /* loop over all of the predefined values and add each component */
256 frame
= talloc_stackframe();
258 for (i
=0; builtin_registry_values
[i
].path
!= NULL
; i
++) {
260 values
= TALLOC_ZERO_P(frame
, REGVAL_CTR
);
261 if (values
== NULL
) {
266 regdb_fetch_values(builtin_registry_values
[i
].path
, values
);
268 /* preserve existing values across restarts. Only add new ones */
270 if (!regval_ctr_key_exists(values
,
271 builtin_registry_values
[i
].valuename
))
273 switch(builtin_registry_values
[i
].type
) {
275 regval_ctr_addvalue(values
,
276 builtin_registry_values
[i
].valuename
,
278 (char*)&builtin_registry_values
[i
].data
.dw_value
,
284 builtin_registry_values
[i
].data
.string
,
286 regval_ctr_addvalue(values
,
287 builtin_registry_values
[i
].valuename
,
290 data
.uni_str_len
*sizeof(uint16
));
294 DEBUG(0, ("init_registry_data: invalid value "
295 "type in builtin_registry_values "
297 builtin_registry_values
[i
].type
));
299 regdb_store_values(builtin_registry_values
[i
].path
,
307 if (regdb
->transaction_commit(regdb
) != 0) {
308 DEBUG(0, ("init_registry_data: Could not commit "
310 return WERR_REG_IO_FAILURE
;
319 if (regdb
->transaction_cancel(regdb
) != 0) {
320 smb_panic("init_registry_data: tdb_transaction_cancel "
327 /***********************************************************************
328 Open the registry database
329 ***********************************************************************/
331 WERROR
regdb_init(void)
333 const char *vstring
= "INFO/version";
338 DEBUG(10, ("regdb_init: incrementing refcount (%d)\n",
344 regdb
= db_open_trans(NULL
, state_path("registry.tdb"), 0,
345 REG_TDB_FLAGS
, O_RDWR
, 0600);
347 regdb
= db_open_trans(NULL
, state_path("registry.tdb"), 0,
348 REG_TDB_FLAGS
, O_RDWR
|O_CREAT
, 0600);
350 werr
= ntstatus_to_werror(map_nt_error_from_unix(errno
));
351 DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n",
352 state_path("registry.tdb"), strerror(errno
) ));
356 DEBUG(10,("regdb_init: Successfully created registry tdb\n"));
361 vers_id
= dbwrap_fetch_int32(regdb
, vstring
);
363 if ( vers_id
!= REGVER_V1
) {
365 /* any upgrade code here if needed */
366 DEBUG(10, ("regdb_init: got %s = %d != %d\n", vstring
,
367 vers_id
, REGVER_V1
));
368 status
= dbwrap_trans_store_int32(regdb
, vstring
, REGVER_V1
);
369 if (!NT_STATUS_IS_OK(status
)) {
370 DEBUG(0, ("regdb_init: error storing %s = %d: %s\n",
371 vstring
, REGVER_V1
, nt_errstr(status
)));
372 return ntstatus_to_werror(status
);
374 DEBUG(10, ("regdb_init: stored %s = %d\n",
375 vstring
, REGVER_V1
));
382 /***********************************************************************
383 Open the registry. Must already have been initialized by regdb_init()
384 ***********************************************************************/
386 WERROR
regdb_open( void )
388 WERROR result
= WERR_OK
;
391 DEBUG(10,("regdb_open: incrementing refcount (%d)\n", regdb_refcount
));
398 regdb
= db_open_trans(NULL
, state_path("registry.tdb"), 0,
399 REG_TDB_FLAGS
, O_RDWR
, 0600);
401 result
= ntstatus_to_werror( map_nt_error_from_unix( errno
) );
402 DEBUG(0,("regdb_open: Failed to open %s! (%s)\n",
403 state_path("registry.tdb"), strerror(errno
) ));
409 DEBUG(10,("regdb_open: refcount reset (%d)\n", regdb_refcount
));
414 /***********************************************************************
415 ***********************************************************************/
417 int regdb_close( void )
419 if (regdb_refcount
== 0) {
425 DEBUG(10,("regdb_close: decrementing refcount (%d)\n", regdb_refcount
));
427 if ( regdb_refcount
> 0 )
430 SMB_ASSERT( regdb_refcount
>= 0 );
436 /***********************************************************************
437 return the tdb sequence number of the registry tdb.
438 this is an indicator for the content of the registry
439 having changed. it will change upon regdb_init, too, though.
440 ***********************************************************************/
441 int regdb_get_seqnum(void)
443 return regdb
->get_seqnum(regdb
);
446 /***********************************************************************
447 Add subkey strings to the registry tdb under a defined key
448 fmt is the same format as tdb_pack except this function only supports
450 ***********************************************************************/
452 static bool regdb_store_keys_internal(const char *key
, REGSUBKEY_CTR
*ctr
)
455 uint8
*buffer
= NULL
;
459 uint32 num_subkeys
= regsubkey_ctr_numkeys(ctr
);
460 char *keyname
= NULL
;
461 TALLOC_CTX
*ctx
= talloc_stackframe();
468 keyname
= talloc_strdup(ctx
, key
);
472 keyname
= normalize_reg_path(ctx
, keyname
);
474 /* allocate some initial memory */
476 buffer
= (uint8
*)SMB_MALLOC(1024);
477 if (buffer
== NULL
) {
483 /* store the number of subkeys */
485 len
+= tdb_pack(buffer
+len
, buflen
-len
, "d", num_subkeys
);
487 /* pack all the strings */
489 for (i
=0; i
<num_subkeys
; i
++) {
490 len
+= tdb_pack(buffer
+len
, buflen
-len
, "f",
491 regsubkey_ctr_specific_key(ctr
, i
));
493 /* allocate some extra space */
494 buffer
= (uint8
*)SMB_REALLOC(buffer
, len
*2);
496 DEBUG(0, ("regdb_store_keys: Failed to realloc "
497 "memory of size [%d]\n", len
*2));
502 len
= tdb_pack(buffer
+len
, buflen
-len
, "f",
503 regsubkey_ctr_specific_key(ctr
, i
));
507 /* finally write out the data */
511 status
= dbwrap_store_bystring(regdb
, keyname
, dbuf
, TDB_REPLACE
);
512 if (!NT_STATUS_IS_OK(status
)) {
523 /***********************************************************************
524 Store the new subkey record and create any child key records that
525 do not currently exist
526 ***********************************************************************/
528 bool regdb_store_keys(const char *key
, REGSUBKEY_CTR
*ctr
)
532 REGSUBKEY_CTR
*subkeys
= NULL
, *old_subkeys
= NULL
;
533 char *oldkeyname
= NULL
;
534 TALLOC_CTX
*ctx
= talloc_stackframe();
538 * fetch a list of the old subkeys so we can determine if anything has
542 if (!(old_subkeys
= TALLOC_ZERO_P(ctx
, REGSUBKEY_CTR
))) {
543 DEBUG(0,("regdb_store_keys: talloc() failure!\n"));
547 regdb_fetch_keys(key
, old_subkeys
);
549 if ((ctr
->num_subkeys
&& old_subkeys
->num_subkeys
) &&
550 (ctr
->num_subkeys
== old_subkeys
->num_subkeys
)) {
552 for (i
= 0; i
<ctr
->num_subkeys
; i
++) {
553 if (strcmp(ctr
->subkeys
[i
],
554 old_subkeys
->subkeys
[i
]) != 0) {
558 if (i
== ctr
->num_subkeys
) {
560 * Nothing changed, no point to even start a tdb
563 TALLOC_FREE(old_subkeys
);
568 TALLOC_FREE(old_subkeys
);
570 if (regdb
->transaction_start(regdb
) != 0) {
571 DEBUG(0, ("regdb_store_keys: transaction_start failed\n"));
576 * Re-fetch the old keys inside the transaction
579 if (!(old_subkeys
= TALLOC_ZERO_P(ctx
, REGSUBKEY_CTR
))) {
580 DEBUG(0,("regdb_store_keys: talloc() failure!\n"));
584 regdb_fetch_keys(key
, old_subkeys
);
586 /* store the subkey list for the parent */
588 if (!regdb_store_keys_internal(key
, ctr
) ) {
589 DEBUG(0,("regdb_store_keys: Failed to store new subkey list "
590 "for parent [%s]\n", key
));
594 /* now delete removed keys */
596 num_subkeys
= regsubkey_ctr_numkeys(old_subkeys
);
597 for (i
=0; i
<num_subkeys
; i
++) {
598 oldkeyname
= regsubkey_ctr_specific_key(old_subkeys
, i
);
600 if (regsubkey_ctr_key_exists(ctr
, oldkeyname
)) {
602 * It's still around, don't delete
608 path
= talloc_asprintf(ctx
, "%s/%s", key
, oldkeyname
);
612 path
= normalize_reg_path(ctx
, path
);
616 status
= dbwrap_delete_bystring(regdb
, path
);
617 if (!NT_STATUS_IS_OK(status
)) {
618 DEBUG(1, ("Deleting %s failed\n", path
));
623 path
= talloc_asprintf(ctx
, "%s/%s/%s",
630 path
= normalize_reg_path(ctx
, path
);
636 * Ignore errors here, we might have no values around
638 dbwrap_delete_bystring(regdb
, path
);
642 TALLOC_FREE(old_subkeys
);
644 /* now create records for any subkeys that don't already exist */
646 num_subkeys
= regsubkey_ctr_numkeys(ctr
);
648 if (num_subkeys
== 0) {
649 if (!(subkeys
= TALLOC_ZERO_P(ctx
, REGSUBKEY_CTR
)) ) {
650 DEBUG(0,("regdb_store_keys: talloc() failure!\n"));
654 if (!regdb_store_keys_internal(key
, subkeys
)) {
655 DEBUG(0,("regdb_store_keys: Failed to store "
656 "new record for key [%s]\n", key
));
659 TALLOC_FREE(subkeys
);
663 for (i
=0; i
<num_subkeys
; i
++) {
664 path
= talloc_asprintf(ctx
, "%s/%s",
666 regsubkey_ctr_specific_key(ctr
, i
));
670 if (!(subkeys
= TALLOC_ZERO_P(ctx
, REGSUBKEY_CTR
)) ) {
671 DEBUG(0,("regdb_store_keys: talloc() failure!\n"));
675 if (regdb_fetch_keys( path
, subkeys
) == -1) {
676 /* create a record with 0 subkeys */
677 if (!regdb_store_keys_internal(path
, subkeys
)) {
678 DEBUG(0,("regdb_store_keys: Failed to store "
679 "new record for key [%s]\n", path
));
684 TALLOC_FREE(subkeys
);
688 if (regdb
->transaction_commit(regdb
) != 0) {
689 DEBUG(0, ("regdb_store_keys: Could not commit transaction\n"));
697 if (regdb
->transaction_cancel(regdb
) != 0) {
698 smb_panic("regdb_store_keys: transaction_cancel failed\n");
708 /***********************************************************************
709 Retrieve an array of strings containing subkeys. Memory should be
710 released by the caller.
711 ***********************************************************************/
713 int regdb_fetch_keys(const char *key
, REGSUBKEY_CTR
*ctr
)
724 TALLOC_CTX
*frame
= talloc_stackframe();
727 DEBUG(11,("regdb_fetch_keys: Enter key => [%s]\n", key
? key
: "NULL"));
729 path
= talloc_strdup(frame
, key
);
734 /* convert to key format */
735 path
= talloc_string_sub(frame
, path
, "\\", "/");
741 ctr
->seqnum
= regdb_get_seqnum();
743 dbret
= regdb
->fetch(regdb
, frame
, string_term_tdb_data(path
), &value
);
749 buflen
= value
.dsize
;
752 DEBUG(5,("regdb_fetch_keys: tdb lookup failed to locate key [%s]\n", key
));
756 len
= tdb_unpack( buf
, buflen
, "d", &num_items
);
758 for (i
=0; i
<num_items
; i
++) {
759 len
+= tdb_unpack(buf
+len
, buflen
-len
, "f", subkeyname
);
760 werr
= regsubkey_ctr_addkey(ctr
, subkeyname
);
761 if (!W_ERROR_IS_OK(werr
)) {
762 DEBUG(5, ("regdb_fetch_keys: regsubkey_ctr_addkey "
763 "failed: %s\n", dos_errstr(werr
)));
768 DEBUG(11,("regdb_fetch_keys: Exit [%d] items\n", num_items
));
776 /****************************************************************************
777 Unpack a list of registry values frem the TDB
778 ***************************************************************************/
780 static int regdb_unpack_values(REGVAL_CTR
*values
, uint8
*buf
, int buflen
)
787 uint32 num_values
= 0;
790 /* loop and unpack the rest of the registry values */
792 len
+= tdb_unpack(buf
+len
, buflen
-len
, "d", &num_values
);
794 for ( i
=0; i
<num_values
; i
++ ) {
795 /* unpack the next regval */
801 len
+= tdb_unpack(buf
+len
, buflen
-len
, "fdB",
807 /* add the new value. Paranoid protective code -- make sure data_p is valid */
809 if (*valuename
&& size
&& data_p
) {
810 regval_ctr_addvalue(values
, valuename
, type
,
811 (const char *)data_p
, size
);
813 SAFE_FREE(data_p
); /* 'B' option to tdb_unpack does a malloc() */
815 DEBUG(8,("specific: [%s], len: %d\n", valuename
, size
));
821 /****************************************************************************
822 Pack all values in all printer keys
823 ***************************************************************************/
825 static int regdb_pack_values(REGVAL_CTR
*values
, uint8
*buf
, int buflen
)
835 num_values
= regval_ctr_numvals( values
);
837 /* pack the number of values first */
839 len
+= tdb_pack( buf
+len
, buflen
-len
, "d", num_values
);
841 /* loop over all values */
843 for ( i
=0; i
<num_values
; i
++ ) {
844 val
= regval_ctr_specific_value( values
, i
);
845 len
+= tdb_pack(buf
+len
, buflen
-len
, "fdB",
849 regval_data_p(val
) );
855 /***********************************************************************
856 Retrieve an array of strings containing subkeys. Memory should be
857 released by the caller.
858 ***********************************************************************/
860 int regdb_fetch_values( const char* key
, REGVAL_CTR
*values
)
863 TALLOC_CTX
*ctx
= talloc_stackframe();
868 DEBUG(10,("regdb_fetch_values: Looking for value of key [%s] \n", key
));
870 keystr
= talloc_asprintf(ctx
, "%s/%s", REG_VALUE_PREFIX
, key
);
874 keystr
= normalize_reg_path(ctx
, keystr
);
879 values
->seqnum
= regdb_get_seqnum();
881 dbret
= regdb
->fetch(regdb
, ctx
, string_term_tdb_data(keystr
), &value
);
887 /* all keys have zero values by default */
891 regdb_unpack_values(values
, value
.dptr
, value
.dsize
);
892 ret
= regval_ctr_numvals(values
);
899 bool regdb_store_values( const char *key
, REGVAL_CTR
*values
)
901 TDB_DATA old_data
, data
;
903 TALLOC_CTX
*ctx
= talloc_stackframe();
908 DEBUG(10,("regdb_store_values: Looking for value of key [%s] \n", key
));
912 len
= regdb_pack_values(values
, data
.dptr
, data
.dsize
);
914 DEBUG(0,("regdb_store_values: unable to pack values. len <= 0\n"));
918 data
.dptr
= TALLOC_ARRAY(ctx
, uint8
, len
);
921 len
= regdb_pack_values(values
, data
.dptr
, data
.dsize
);
923 SMB_ASSERT( len
== data
.dsize
);
925 keystr
= talloc_asprintf(ctx
, "%s/%s", REG_VALUE_PREFIX
, key
);
929 keystr
= normalize_reg_path(ctx
, keystr
);
934 old_data
= dbwrap_fetch_bystring(regdb
, ctx
, keystr
);
936 if ((old_data
.dptr
!= NULL
)
937 && (old_data
.dsize
== data
.dsize
)
938 && (memcmp(old_data
.dptr
, data
.dptr
, data
.dsize
) == 0))
944 status
= dbwrap_trans_store(regdb
, string_term_tdb_data(keystr
), data
,
947 result
= NT_STATUS_IS_OK(status
);
954 static WERROR
regdb_get_secdesc(TALLOC_CTX
*mem_ctx
, const char *key
,
955 struct security_descriptor
**psecdesc
)
960 TALLOC_CTX
*tmp_ctx
= talloc_stackframe();
961 WERROR err
= WERR_OK
;
963 DEBUG(10, ("regdb_get_secdesc: Getting secdesc of key [%s]\n", key
));
965 tdbkey
= talloc_asprintf(tmp_ctx
, "%s/%s", REG_SECDESC_PREFIX
, key
);
966 if (tdbkey
== NULL
) {
970 normalize_dbkey(tdbkey
);
972 data
= dbwrap_fetch_bystring(regdb
, tmp_ctx
, tdbkey
);
973 if (data
.dptr
== NULL
) {
978 status
= unmarshall_sec_desc(mem_ctx
, (uint8
*)data
.dptr
, data
.dsize
,
981 if (NT_STATUS_EQUAL(status
, NT_STATUS_NO_MEMORY
)) {
983 } else if (!NT_STATUS_IS_OK(status
)) {
984 err
= WERR_REG_CORRUPT
;
988 TALLOC_FREE(tmp_ctx
);
992 static WERROR
regdb_set_secdesc(const char *key
,
993 struct security_descriptor
*secdesc
)
995 TALLOC_CTX
*mem_ctx
= talloc_stackframe();
998 WERROR err
= WERR_NOMEM
;
1001 tdbkey
= talloc_asprintf(mem_ctx
, "%s/%s", REG_SECDESC_PREFIX
, key
);
1002 if (tdbkey
== NULL
) {
1005 normalize_dbkey(tdbkey
);
1007 if (secdesc
== NULL
) {
1008 /* assuming a delete */
1009 status
= dbwrap_trans_delete(regdb
,
1010 string_term_tdb_data(tdbkey
));
1011 if (NT_STATUS_IS_OK(status
)) {
1014 err
= ntstatus_to_werror(status
);
1019 err
= ntstatus_to_werror(marshall_sec_desc(mem_ctx
, secdesc
,
1022 if (!W_ERROR_IS_OK(err
)) {
1026 status
= dbwrap_trans_store(regdb
, string_term_tdb_data(tdbkey
),
1028 if (!NT_STATUS_IS_OK(status
)) {
1029 err
= ntstatus_to_werror(status
);
1034 TALLOC_FREE(mem_ctx
);
1038 bool regdb_subkeys_need_update(REGSUBKEY_CTR
*subkeys
)
1040 return (regdb_get_seqnum() != subkeys
->seqnum
);
1043 bool regdb_values_need_update(REGVAL_CTR
*values
)
1045 return (regdb_get_seqnum() != values
->seqnum
);
1049 * Table of function pointers for default access
1052 REGISTRY_OPS regdb_ops
= {
1053 .fetch_subkeys
= regdb_fetch_keys
,
1054 .fetch_values
= regdb_fetch_values
,
1055 .store_subkeys
= regdb_store_keys
,
1056 .store_values
= regdb_store_values
,
1057 .get_secdesc
= regdb_get_secdesc
,
1058 .set_secdesc
= regdb_set_secdesc
,
1059 .subkeys_need_update
= regdb_subkeys_need_update
,
1060 .values_need_update
= regdb_values_need_update