--- utils/profiles.c.19761 2006-11-17 07:40:52.000000000 -0500 +++ utils/profiles.c 2006-11-17 14:43:16.000000000 -0500 @@ -34,24 +34,49 @@ static BOOL swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 ) { - SEC_ACL *acl = sd->dacl; + SEC_ACL *acl; int i; BOOL update = False; + fprintf(stdout, " Owner SID: %s\n", sid_string_static(sd->owner_sid)); if ( sid_equal( sd->owner_sid, s1 ) ) { sid_copy( sd->owner_sid, s2 ); update = True; + fprintf(stdout, " New Owner SID: %s\n", + sid_string_static(sd->owner_sid)); } + fprintf(stdout, " Group SID: %s\n", sid_string_static(sd->grp_sid)); if ( sid_equal( sd->grp_sid, s1 ) ) { sid_copy( sd->grp_sid, s2 ); update = True; + fprintf(stdout, " New Group SID: %s\n", + sid_string_static(sd->grp_sid)); } + acl = sd->sacl; + fprintf(stdout, " SACL: %d entries:\n", acl->num_aces); for ( i=0; inum_aces; i++ ) { + fprintf(stdout, " Trustee SID: %s\n", + sid_string_static(&acl->ace[i].trustee)); if ( sid_equal( &acl->ace[i].trustee, s1 ) ) { sid_copy( &acl->ace[i].trustee, s2 ); update = True; + fprintf(stdout, " New Trustee SID: %s\n", + sid_string_static(&acl->ace[i].trustee)); + } + } + + acl = sd->dacl; + fprintf(stdout, " DACL: %d entries: \n", acl->num_aces); + for ( i=0; inum_aces; i++ ) { + fprintf(stdout, " Trustee SID: %s\n", + sid_string_static(&acl->ace[i].trustee)); + if ( sid_equal( &acl->ace[i].trustee, s1 ) ) { + sid_copy( &acl->ace[i].trustee, s2 ); + update = True; + fprintf(stdout, " New Trustee SID: %s\n", + sid_string_static(&acl->ace[i].trustee)); } } @@ -79,8 +104,9 @@ return False; } - if ( swap_sid_in_acl( new_sd, &old_sid, &new_sid ) ) - DEBUG(2,("Updating ACL for %s\n", nk->keyname )); + + fprintf(stdout, "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 )) ) { DEBUG(0,("copy_registry_tree: talloc() failure!\n"));