New registry backend(s)
Andrew Bartlett
abartlet at samba.org
Thu Sep 25 14:05:34 GMT 2003
On Thu, 2003-09-25 at 07:39, Jelmer Vernooij wrote:
> Hi!
>
> For the past few hours, I've been working on restructuring Samba's
> registry handling. Features are:
>
> - Call all three current registry backends(tdb,nt4,rpc) with the same calls
> - Make it possible to create a registry library.
>
> After this update, source/registry/ will contain the following files:
>
> reg_cachehook.c - Caching of values for better performance (?)
> reg_backend_nt4.c - TDB backend for registry
> reg_backend_tdb.c - NT4 Registry Files backend by Richard Sharpe
> reg_backend_rpc.c - Do remote registry management (calls rpc_client/
> functions)
> reg_frontend.c - Frontend used by Samba. Contains the 'hooks' stuff
> Jerry has written
> reg_interface.c - Interface to the various backends.
> reg_objects.c - Fiddling with registry objects
> reg_printing.c - Samba printing-related stuff.
> reg_cmd_file.c - Parsing (and applying) of regedit (plaintext) command files. Used by editreg
>
> The functions a registry backend should provide are:
>
> typedef struct {
> REG_HANDLE *open_registry (char *location);
> REG_KEY *open_root_key (REG_HANDLE *);
> REG_KEY *open_key_rel (REG_KEY *parent, char *name);
> /* if open_key_abs is set to NULL, a default implementation will be provided. */
> REG_KEY *open_key_abs (REG_HANDLE *, char *name);
> REG_KEY_LIST *get_children (REG_KEY *);
> REG_VAL_LIST *get_values (REG_KEY *);
> BOOL *add_key(REG_KEY *, REG_KEY *);
> BOOL *update_key(REG_KEY *);
> BOOL *del_key(REG_KEY *);
> BOOL *add_value(REG_KEY *, REG_VALUE *);
> BOOL *update_value(REG_VALUE *);
> BOOL *del_value(REG_VALUE *);
> REG_VAL *get_value (REG_KEY *, char *name);
> /* It is not guaranteed that no data has been stored before save()
> * has been called. This function is only useful for backends that
> * store the data in memory and then write out the whole registry at once */
> BOOL save(REG_HANDLE *, char *location);
> BOOL close_registry (REG_HANDLE *);
> } REGISTRY_OPS;
>
> I will also rewrite editreg to use this interface. kregedit (and
> perhaps gregedit?) will be a full regedit32 clone after this is all
> finished (including management of remote registries).
>
> Does anyone have objections against such an approach ?
Sounds good to me. I would like to see a gconf or wine backend, when
you run out of other things to do :-)
Andrew Bartlett
--
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20030925/7f981ac4/attachment.bin
More information about the samba-technical
mailing list