Date: Mon, 28 Feb 2011 21:40:10 -0700 From: Shawn Webb <lattera@gmail.com> To: FreeBSD-current <freebsd-current@freebsd.org> Subject: Re: setfacl Recursive Functionality Message-ID: <AANLkTik7D_uzL33M-ABZmM27NpfXrPsuCXvjo2fhE7Ky@mail.gmail.com> In-Reply-To: <AANLkTi=%2BWtmRz07m=Cg7hbXJGw7eWRHC1ASGeufTSLBB@mail.gmail.com> References: <AANLkTi=%2BWtmRz07m=Cg7hbXJGw7eWRHC1ASGeufTSLBB@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--002215b02cc23db270049d646457 Content-Type: text/plain; charset=ISO-8859-1 One last patch before I do a send-pr to send the patch upstream. This patch depends on my ZFS ACL Sets patch for the -k flag. I wanted to zero-out the ACL entries recursively for a directory, which I can do in Solaris with "chmod -R A= /path/to/directory", but ZFS doesn't allow zero-number ACL sets. To work around that, I'm giving owner@ full permissions (the full_set ACL set). I'll also include my ZFS ACL Sets patch. That has already been submitted upstream and I'm awaiting approval. Thanks, Shawn On Tue, Feb 8, 2011 at 10:58 AM, Shawn Webb <lattera@gmail.com> wrote: > I've just finished a patch to add recursive functionality to setfacl. > Before I officially submit it, I'd like a few suggestions on how to improve > the patch. > > The part I'm worried about involves the #define directive at top. I'm not > sure what ramifications using that define might have. I needed it for my > remove_invalid_inherit() function to work. > > Thanks, > > Shawn > > attached: setfacl.patch (universal diff) > --002215b02cc23db270049d646457 Content-Type: application/octet-stream; name="setfacl_recursive.patch" Content-Disposition: attachment; filename="setfacl_recursive.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gkqbv5wr1 ZGlmZiAtLWdpdCBhL2Jpbi9zZXRmYWNsL3NldGZhY2wuYyBiL2Jpbi9zZXRmYWNsL3NldGZhY2wu YwppbmRleCBhMGY5MzdjLi4yNTMyMTg4IDEwMDY0NAotLS0gYS9iaW4vc2V0ZmFjbC9zZXRmYWNs LmMKKysrIGIvYmluL3NldGZhY2wvc2V0ZmFjbC5jCkBAIC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wZSAhPSBBQ0xfVFlQRV9ORlM0KSB7CisJCQkJCWlmIChhY2xfZGVsZXRlX2RlZl9m aWxlKGZpbGUtPmZpbGVuYW1lKSA9PSAtMSkgeworCQkJCQkJd2FybigiJXM6IGFjbF9kZWxldGVf ZGVmX2ZpbGUoKSBmYWlsZWQiLAorCQkJCQkJCWZpbGUtPmZpbGVuYW1lKTsKKwkJCQkJCWxvY2Fs X2Vycm9yKys7CisJCQkJCX0KKwkJCQkJaWYgKGFjbF90eXBlID09IEFDTF9UWVBFX0RFRkFVTFQp CisJCQkJCQlsb2NhbF9lcnJvciArPSByZW1vdmVfZGVmYXVsdCgmYWNsLAorCQkJCQkJCWZpbGUt PmZpbGVuYW1lKTsKKwkJCQl9IGVsc2UgeworCQkJCQkvKiBGcmVlQlNEIGRvZXMgbm90IHN1cHBv cnQgYSB6ZXJvIGFtb3VudCBvZiBBQ0wgZW50cmllcyBsaWtlIFNvbGFyaXMsIGdpdmUgb3duZXJA IGZ1bGwgcGVybWlzc2lvbnMgKi8KKwkJCQkJYWNsX2ZyZWUoYWNsKTsKKwkJCQkJYWNsID0gYWNs X2Zyb21fdGV4dCgib3duZXJAOmZ1bGxfc2V0OjphbGxvdyIpOwogCQkJCX0KLQkJCQlpZiAoYWNs X3R5cGUgPT0gQUNMX1RZUEVfREVGQVVMVCkKLQkJCQkJbG9jYWxfZXJyb3IgKz0gcmVtb3ZlX2Rl ZmF1bHQoJmFjbCwKLQkJCQkJICAgIGZpbGUtPmZpbGVuYW1lKTsKIAkJCQluZWVkX21hc2sgPSAw OwogCQkJCWJyZWFrOwogCQkJY2FzZSBPUF9SRU1PVkVfQUNMOgo= --002215b02cc23db270049d646457 Content-Type: application/octet-stream; name="zfs_acl_set.patch" Content-Disposition: attachment; filename="zfs_acl_set.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gkqbw7b82 Ci0tLSByZWxlbmdfOF8yL3NyYy9saWIvbGliYy9wb3NpeDFlL2FjbF9zdXBwb3J0X25m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9PSAwKSB7CisJCQkqdmFy IHw9IChBQ0xfV1JJVEVfREFUQSB8IEFDTF9BUFBFTkRfREFUQSB8IEFDTF9XUklURV9BVFRSSUJV VEVTIHwgQUNMX1dSSVRFX05BTUVEX0FUVFJTKTsKKwkJCWZvdW5kID0gMTsKKwkJCWV2ZXJfZm91 bmQgPSAxOworCQl9CisJCWVsc2UgaWYgKGZsYWdzID09IGFfYWNjZXNzX21hc2tzICYmIHN0cmNt cCgibW9kaWZ5X3NldCIsIGZsYWcpID09IDApIHsKKwkJCWZvciAoaSA9IDA7IGZsYWdzW2ldLm5h bWUgIT0gTlVMTDsgaSsrKQorCQkJCWlmIChmbGFnc1tpXS5mbGFnICE9IEFDTF9XUklURV9BQ0wg fHwgZmxhZ3NbaV0uZmxhZyAhPSBBQ0xfV1JJVEVfT1dORVIpCisJCQkJCSp2YXIgfD0gZmxhZ3Nb aV0uZmxhZzsKKwkJCWZvdW5kID0gMTsKKwkJCWV2ZXJfZm91bmQgPSAxOworCQl9CisJCWVsc2Ug eworCQkJZm9yIChpID0gMDsgZmxhZ3NbaV0ubmFtZSAhPSBOVUxMOyBpKyspIHsKKwkJCQlpZiAo c3RyY21wKGZsYWdzW2ldLm5hbWUsIGZsYWcpID09IDApIHsKKwkJCQkJKnZhciB8PSBmbGFnc1tp XS5mbGFnOworCQkJCQlmb3VuZCA9IDE7CisJCQkJCWV2ZXJfZm91bmQgPSAxOworCQkJCX0KIAkJ CX0KIAkJfQogCgoK --002215b02cc23db270049d646457--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik7D_uzL33M-ABZmM27NpfXrPsuCXvjo2fhE7Ky>