summaryrefslogtreecommitdiff
path: root/source3/utils/profiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/profiles.c')
-rw-r--r--source3/utils/profiles.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c
index 5dd788ad5f..0ac93dedeb 100644
--- a/source3/utils/profiles.c
+++ b/source3/utils/profiles.c
@@ -57,7 +57,7 @@ static void verbose_output(const char *format, ...)
static bool swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
{
- SEC_ACL *acl;
+ SEC_ACL *theacl;
int i;
bool update = False;
@@ -78,30 +78,30 @@ static bool swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
sid_string_tos(sd->group_sid));
}
- acl = sd->dacl;
- verbose_output(" DACL: %d entries:\n", acl->num_aces);
- for ( i=0; i<acl->num_aces; i++ ) {
+ theacl = sd->dacl;
+ verbose_output(" DACL: %d entries:\n", theacl->num_aces);
+ for ( i=0; i<theacl->num_aces; i++ ) {
verbose_output(" Trustee SID: %s\n",
- sid_string_tos(&acl->aces[i].trustee));
- if ( sid_equal( &acl->aces[i].trustee, s1 ) ) {
- sid_copy( &acl->aces[i].trustee, s2 );
+ sid_string_tos(&theacl->aces[i].trustee));
+ if ( sid_equal( &theacl->aces[i].trustee, s1 ) ) {
+ sid_copy( &theacl->aces[i].trustee, s2 );
update = True;
verbose_output(" New Trustee SID: %s\n",
- sid_string_tos(&acl->aces[i].trustee));
+ sid_string_tos(&theacl->aces[i].trustee));
}
}
#if 0
- acl = sd->sacl;
- verbose_output(" SACL: %d entries: \n", acl->num_aces);
- for ( i=0; i<acl->num_aces; i++ ) {
+ theacl = sd->sacl;
+ verbose_output(" SACL: %d entries: \n", theacl->num_aces);
+ for ( i=0; i<theacl->num_aces; i++ ) {
verbose_output(" Trustee SID: %s\n",
- sid_string_tos(&acl->aces[i].trustee));
- if ( sid_equal( &acl->aces[i].trustee, s1 ) ) {
- sid_copy( &acl->aces[i].trustee, s2 );
+ sid_string_tos(&theacl->aces[i].trustee));
+ if ( sid_equal( &theacl->aces[i].trustee, s1 ) ) {
+ sid_copy( &theacl->aces[i].trustee, s2 );
update = True;
verbose_output(" New Trustee SID: %s\n",
- sid_string_tos(&acl->aces[i].trustee));
+ sid_string_tos(&theacl->aces[i].trustee));
}
}
#endif
@@ -118,9 +118,10 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
REGF_NK_REC *key, *subkey;
SEC_DESC *new_sd;
REGVAL_CTR *values;
- REGSUBKEY_CTR *subkeys;
+ struct regsubkey_ctr *subkeys;
int i;
char *path;
+ WERROR werr;
/* swap out the SIDs in the security descriptor */
@@ -132,7 +133,8 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
verbose_output("ACL for %s%s%s\n", parentpath, parent ? "\\" : "", nk->keyname);
swap_sid_in_acl( new_sd, &old_sid, &new_sid );
- if ( !(subkeys = TALLOC_ZERO_P( NULL, REGSUBKEY_CTR )) ) {
+ werr = regsubkey_ctr_init(NULL, &subkeys);
+ if (!W_ERROR_IS_OK(werr)) {
DEBUG(0,("copy_registry_tree: talloc() failure!\n"));
return False;
}
@@ -150,7 +152,7 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
(const char *)nk->values[i].data, (nk->values[i].data_size & ~VK_DATA_IN_OFFSET) );
}
- /* copy subkeys into the REGSUBKEY_CTR */
+ /* copy subkeys into the struct regsubkey_ctr */
while ( (subkey = regfio_fetch_subkey( infile, nk )) ) {
regsubkey_ctr_addkey( subkeys, subkey->keyname );