[PATCH] smbcacls added support for a -I flag
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon Apr 26 01:32:42 MDT 2010
On Sat, Apr 24, 2010 at 01:36:02PM -0700, Matthew McGillis wrote:
> Added support for a -I flag which provides the equivelant functionality of
> setting or unsetting the windows file properity check box:
>
> "Allow inheritable permissions from the parent to propagate to this object
> and all child objects. Include these with entries explicitly defined here."
>
> Hope this comes across correclty for git am this was
> generated from the v3-5-stable branch. Please let me know
> if you run into issues.
Something on the way has gone wrong:
vlendec at delphin:~/git/scratch$ patch -p1 </tmp/x
patching file source3/utils/smbcacls.c
Hunk #1 succeeded at 34 with fuzz 1 (offset -2 lines).
Hunk #2 succeeded at 61 (offset -2 lines).
Hunk #3 FAILED at 658.
Hunk #4 succeeded at 772 (offset -7 lines).
Hunk #5 succeeded at 793 (offset -7 lines).
Hunk #6 FAILED at 847.
Hunk #7 FAILED at 869.
Hunk #8 succeeded at 970 (offset -11 lines).
Hunk #9 succeeded at 1145 with fuzz 2 (offset -11 lines).
Hunk #10 succeeded at 1217 (offset -12 lines).
Hunk #11 succeeded at 1282 (offset -12 lines).
3 out of 11 hunks FAILED -- saving rejects to file
source3/utils/smbcacls.c.rej
What I always do is to commit the patch locally, run
git format-patch HEAD^
and send the resulting patch as an attachment.
Some random comments:
> - TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces, ace_compare);
> + TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces,ace_compare);
What's the real change behind this hunk?
> - if (sddl) {
> + if (sddl) {
> sd = sddl_decode(talloc_tos(), the_acl, get_global_sam_sid());
> - } else {
> + } else {
> sd = sec_desc_parse(talloc_tos(), cli, the_acl);
> - }
> + }
Same here.
> + uint32 oldattr = get_fileinfo(cli,filename);
> +
> + if (strcmp(type,"allow")==0) {
> + old->type=old->type & (~SEC_DESC_DACL_PROTECTED);
> +
> + //look at parent and copy in all its inheritable ACL's.
Some C compilers we try to compile on don't do // style
comments. We try very hard to avoid them. Would it be
possible to change this?
> + string_replace(filename, '\\', '/');
> + char *parentname;
Also, some C compilers don't like declarations after
statements. Would it be possible to group the variable
declarations before all statements in a block?
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100426/85a24d27/attachment.pgp>
More information about the samba-technical
mailing list