The Samba-Bugzilla – Attachment 1871 Details for
Bug 3713
Reintroduce SID reporting for profiles command
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to reintroduce SID reporting.
profiles.c.txt (text/plain), 2.44 KB, created by
William Jojo
on 2006-04-21 10:35:52 UTC
(
hide
)
Description:
patch to reintroduce SID reporting.
Filename:
MIME Type:
Creator:
William Jojo
Created:
2006-04-21 10:35:52 UTC
Size:
2.44 KB
patch
obsolete
>--- utils/profiles.c.orig 2006-04-21 07:35:35.000000000 -0400 >+++ utils/profiles.c 2006-04-21 10:43:58.000000000 -0400 >@@ -32,26 +32,71 @@ > /******************************************************************** > ********************************************************************/ > >+static void print_sid(DOM_SID *sid) >+{ >+ int i, comps = sid->num_auths; >+ fprintf(stdout, "S-%u-%u", sid->sid_rev_num, sid->id_auth[5]); >+ >+ for (i = 0; i < comps; i++) { >+ >+ fprintf(stdout, "-%u", sid->sub_auths[i]); >+ >+ } >+ fprintf(stdout, "\n"); >+} >+ >+ >+/******************************************************************** >+********************************************************************/ >+ > 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: "); >+ print_sid(sd->owner_sid); > if ( sid_equal( sd->owner_sid, s1 ) ) { > sid_copy( sd->owner_sid, s2 ); > update = True; >+ fprintf(stdout, " New Owner SID: "); >+ print_sid(sd->owner_sid); >+ > } > >+ fprintf(stdout, " Group SID: "); >+ print_sid(sd->grp_sid); > if ( sid_equal( sd->grp_sid, s1 ) ) { > sid_copy( sd->grp_sid, s2 ); > update = True; >+ fprintf(stdout, " New Group SID: "); >+ print_sid(sd->grp_sid); >+ } >+ >+ acl = sd->sacl; >+ fprintf(stdout, " SACL: %d entries: \n", acl->num_aces); >+ for ( i=0; i<acl->num_aces; i++ ) { >+ fprintf(stdout, " Trustee SID: "); >+ print_sid(&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: "); >+ print_sid(&acl->ace[i].trustee); >+ } > } > >+ acl = sd->dacl; >+ fprintf(stdout, " DACL: %d entries: \n", acl->num_aces); > for ( i=0; i<acl->num_aces; i++ ) { >+ fprintf(stdout, " Trustee SID: "); >+ print_sid(&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: "); >+ print_sid(&acl->ace[i].trustee); > } > } > >@@ -79,8 +124,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"));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3713
: 1871 |
2193
|
2225