diff options
author | David Disseldorp <ddiss@samba.org> | 2014-05-26 14:39:41 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-05-28 17:52:13 +0200 |
commit | f6e5af03d446f3979ce706cd950571d83cf9284b (patch) | |
tree | 3a913570583cd599faa0f9d189ca214d3104cac1 /source3/utils/sharesec.c | |
parent | 4a9d64e37a72cd1384c1e8db54532b8e850715cd (diff) | |
download | samba-f6e5af03d446f3979ce706cd950571d83cf9284b.tar.gz samba-f6e5af03d446f3979ce706cd950571d83cf9284b.tar.xz samba-f6e5af03d446f3979ce706cd950571d83cf9284b.zip |
sharesec: remove unused security descriptor print fns
IDL generated NDR routines are now used, so the old hand rolled
functions can be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/utils/sharesec.c')
-rw-r--r-- | source3/utils/sharesec.c | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c index 969d9674f3..67e399158a 100644 --- a/source3/utils/sharesec.c +++ b/source3/utils/sharesec.c @@ -68,91 +68,6 @@ static const struct perm_value standard_values[] = { }; /******************************************************************** - print an ACE on a FILE -********************************************************************/ - -static void print_ace(FILE *f, struct security_ace *ace) -{ - const struct perm_value *v; - int do_print = 0; - uint32 got_mask; - - fprintf(f, "%s:", sid_string_tos(&ace->trustee)); - - /* Ace type */ - - if (ace->type == SEC_ACE_TYPE_ACCESS_ALLOWED) { - fprintf(f, "ALLOWED"); - } else if (ace->type == SEC_ACE_TYPE_ACCESS_DENIED) { - fprintf(f, "DENIED"); - } else { - fprintf(f, "%d", ace->type); - } - - /* Not sure what flags can be set in a file ACL */ - - fprintf(f, "/%d/", ace->flags); - - /* Standard permissions */ - - for (v = standard_values; v->perm; v++) { - if (ace->access_mask == v->mask) { - fprintf(f, "%s", v->perm); - return; - } - } - - /* Special permissions. Print out a hex value if we have - leftover bits in the mask. */ - - got_mask = ace->access_mask; - - again: - for (v = special_values; v->perm; v++) { - if ((ace->access_mask & v->mask) == v->mask) { - if (do_print) { - fprintf(f, "%s", v->perm); - } - got_mask &= ~v->mask; - } - } - - if (!do_print) { - if (got_mask != 0) { - fprintf(f, "0x%08x", ace->access_mask); - } else { - do_print = 1; - goto again; - } - } -} - -/******************************************************************** - print an ascii version of a security descriptor on a FILE handle -********************************************************************/ - -static void sec_desc_print(FILE *f, struct security_descriptor *sd) -{ - uint32 i; - - fprintf(f, "REVISION:%d\n", sd->revision); - - /* Print owner and group sid */ - - fprintf(f, "OWNER:%s\n", sid_string_tos(sd->owner_sid)); - - fprintf(f, "GROUP:%s\n", sid_string_tos(sd->group_sid)); - - /* Print aces */ - for (i = 0; sd->dacl && i < sd->dacl->num_aces; i++) { - struct security_ace *ace = &sd->dacl->aces[i]; - fprintf(f, "ACL:"); - print_ace(f, ace); - fprintf(f, "\n"); - } -} - -/******************************************************************** parse an ACE in the same format as print_ace() ********************************************************************/ |