mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s3:registry: add a regsubkey_ctr_init function for allocating a regsubkey_ctr
Michael
This commit is contained in:
parent
060abd7e38
commit
763f41f39c
@ -5129,6 +5129,7 @@ WERROR registry_init_smbconf(const char *keyname);
|
||||
|
||||
/* The following definitions come from registry/reg_objects.c */
|
||||
|
||||
WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr);
|
||||
WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname );
|
||||
int regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname );
|
||||
bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname );
|
||||
|
@ -30,12 +30,26 @@
|
||||
talloc()'d since the methods use the object pointer as the talloc
|
||||
context for internal private data.
|
||||
|
||||
There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy()
|
||||
There is no longer a regval_ctr_intit() and regval_ctr_destroy()
|
||||
pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the
|
||||
object.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr)
|
||||
{
|
||||
if (ctr == NULL) {
|
||||
return WERR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
*ctr = talloc_zero(mem_ctx, struct regsubkey_ctr);
|
||||
if (*ctr == NULL) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
||||
return WERR_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
Add a new key to the array
|
||||
**********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user