aboutsummaryrefslogtreecommitdiff
path: root/bin/setfacl
Commit message (Collapse)AuthorAgeFilesLines
* setfacl: Add SPDX-License-Identifier tagsTuukka Pasanen2 days7-0/+14
| | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55212
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* bin/setfacl: remove unreachable break after usage()rilysh2024-01-031-1/+0
| | | | | | Signed-off-by: rilysh <nightquick@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/872
* bin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-275-5/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-166-12/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* setfacl.1: correct reference to a trailing comma, should read "colon"Ceri Davies2023-04-291-2/+2
| | | | | PR: 271063 Reported by: rdd@rdd.nu
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* Remove unused headers.Xin LI2020-12-124-7/+0
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=368574
* fts_read: Handle error from a NULL return better.Bryan Drewery2020-12-081-1/+3
| | | | | | | | | | | | | | | | | | | | This is addressing cases such as fts_read(3) encountering an [EIO] from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be seen as a successful traversal in some of these cases while silently discarding expected work. As noted in r264201, fts_read() does not set errno to 0 on a successful EOF so it needs to be set before calling it. Otherwise we might see a random error from one of the iterations. gzip is ignoring most errors and could be improved separately. Reviewed by: vangyzen Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27184 Notes: svn path=/head/; revision=368467
* Don't set NFSv4 ACL inheritance flags on non-directories.Mark Johnston2018-10-262-14/+71
| | | | | | | | | | | | | | | | | They only make sense in the context of directory ACLs, and attempting to set them on regular files results in errors, causing a recursive setfacl invocation to abort. This is derived from patches by Shawn Webb <shawn.webb@hardenedbsd.org> and Mitchell Horne <mhorne063@gmail.com>. PR: 155163 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15061 Notes: svn path=/head/; revision=339793
* Don't print pathconf() errors if the target file doesn't exist.Mark Johnston2018-10-261-2/+2
| | | | | | | | | | | The subsequent acl_get_file(3) call will simply echo the same error. PR: 229930 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=339781
* Avoid leaking memory in error paths.Mark Johnston2018-10-261-10/+11
| | | | | | | | | CID: 1390906 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=339780
* setfacl: style and break main() into manageable piecesEd Maste2018-04-276-238/+258
| | | | | | | | | | Submitted by: Mitchell Horne MFC with: r332396 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15060 Notes: svn path=/head/; revision=333065
* setfacl: minor man page edit to appease igor(1)Ed Maste2018-04-111-3/+5
| | | | Notes: svn path=/head/; revision=332405
* setfacl: add recursive functionalityEd Maste2018-04-104-82/+160
| | | | | | | | | | | | | | | | | | | | | Add a -R option to setfacl to operate recursively on directories, along with the accompanying flags -H, -L, and -P (whose behaviour mimics chmod). A patch was submitted with PR 155163, but this is a new implementation based on comments raised in the Phabricator review for that patch (review D9096). PR: 155163 Submitted by: Mitchell Horne <mhorne063@gmail.com> Reviewed by: jilles MFC after: 2 weeks Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14934 Notes: svn path=/head/; revision=332396
* Fix mandoc -Tlint warnings in bin/Benjamin Kaduk2017-12-071-4/+6
| | | | | | | | | | | Many style-level issues are still reported. Submitted by: Yuri Pankov <yuripv@gmx.com> Reviewed by: jilles (previous revision) Differential Revision: https://reviews.freebsd.org/D13334 Notes: svn path=/head/; revision=326651
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Explicitly NUL terminate the buffer filled by fread().Don Lewis2016-06-081-3/+3
| | | | | | | | | | | | | | | | The fix in r300649 was not sufficient to convince Coverity that the buffer was NUL terminated, even with the buffer pre-zeroed. Swap the size and nmemb arguments to fread() so that a valid lenght is returned, which we can use to terminate the string in the buffer at the correct location. This should also quiet the complaint about the return value of fread() not being checked. Reported by: Coverity CID: 1019054, 1009614 MFC after: 1 week Notes: svn path=/head/; revision=301582
* Fix Coverity CID 1019054 (String not null terminated) in setfacl.Don Lewis2016-05-251-2/+2
| | | | | | | | | | | | Increase the size of buf[] by one to allow room for a NUL character at the end. Reported by: Coverity CID: 1019054 MFC after: 1 week Notes: svn path=/head/; revision=300649
* Explicitly add unmarked bin/ binaries to the runtime package.Glen Barber2016-02-091-0/+1
| | | | | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295439
* Don't mention the "canonical six" in setfacl(1); it describes semanticsEdward Tomasz Napierala2016-01-231-3/+4
| | | | | | | | | | that's long gone. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=294626
* Expose an interface to determine if an ACE is inherited.Xin LI2015-09-041-2/+4
| | | | | | | | | | Submitted by: sef Reviewed by: trasz MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3540 Notes: svn path=/head/; revision=287445
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge head from 7/28Simon J. Gerraty2014-08-191-2/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=270164
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * sync from headSimon J. Gerraty2013-04-121-7/+17
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | Sync from headSimon J. Gerraty2012-11-044-33/+65
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | use .Mt to mark up email addresses consistently (part1)Baptiste Daroussin2014-06-201-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267667
* | | Mention that read_attributes, write_attributes, read_acl and write_aclEdward Tomasz Napierala2013-04-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are always permitted for the file owner. PR: kern/174948 MFC after: 1 week Notes: svn path=/head/; revision=248972
* | | Fix NFSv4 permission description in setfacl(1) manual page: the 'D'Edward Tomasz Napierala2013-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | means delete_child, not delete. MFC after: 1 week Notes: svn path=/head/; revision=246559
* | | Improve description of the "-m" option to setfacl(1).Edward Tomasz Napierala2013-02-081-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | Submitted by: scottl MFC after: 1 week Notes: svn path=/head/; revision=246558
* | | In the setfacl(1) manual page, make it clear that for NFSv4 ACLs,Edward Tomasz Napierala2013-02-081-1/+6
| |/ |/| | | | | | | | | | | | | | | one should really use -a and -x instead of -m. MFC after: 1 week Notes: svn path=/head/; revision=246557
* | Fix warnings found by -Wmising-variable-declarations.Ed Schouten2012-10-192-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This self-written compiler warning, which is hopefully going to be committed into LLVM sources soon, warns about potentially missing `static' keywords, similar to -Wmissing-prototypes. - bin/pax: Move external declaration of chdname and s_mask into extern.h. - bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h. - sbin/mount_fusefs: Remove char *progname; use getprogname(). - others: add `static' where possible. Notes: svn path=/head/; revision=241720
* | Fix an error in setfacl(1) that manifested like this:Edward Tomasz Napierala2012-09-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # setfacl -m u:trasz:rwx x # setfacl -m u:root:rwx x # getfacl x # file: x # owner: root # group: wheel user::rw- user:root:rwx user:trasz:rwx group::r-- mask::rwx other::r-- # setfacl -m u:root:rwx x setfacl: x: acl_calc_mask() failed: Invalid argument setfacl: x: failed to set ACL mask For NFSv4 ACLs, this sort of situation would result in duplicated entries. MFC after: 1 month Notes: svn path=/head/; revision=240087
* | Make "setfacl -bd" an alias for "setfacl -k". Previously it would crashEdward Tomasz Napierala2012-09-041-0/+11
| | | | | | | | | | | | | | | | | | | | on assert. PR: bin/165807 MFC after: 1 month Notes: svn path=/head/; revision=240084
* | Make setfacl(1) behave properly in situations like "setfacl -kd".Edward Tomasz Napierala2012-09-041-0/+15
| | | | | | | | | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=240083
* | Fix compact form of "synchronize" permission in setfacl(1) manual page - itEdward Tomasz Napierala2012-09-031-2/+2
|/ | | | | | | | | | should be "s", not "S". PR: docs/162380 MFC after: 2 weeks Notes: svn path=/head/; revision=240076
* Remove trailing whitespace per mdoc lint warningEitan Adler2012-03-291-1/+1
| | | | | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days Notes: svn path=/head/; revision=233648
* Make it possible to use permission sets (full_set, modify_set, read_setEdward Tomasz Napierala2011-04-091-2/+17
| | | | | | | | | | | and write_set) with setfacl(1). PR: kern/154113 Submitted by: Shawn Webb <lattera at gmail dot com> (earlier version) MFC after: 1 month Notes: svn path=/head/; revision=220465
* Increase carried_error if we skip a file due to an error. This ensuresJaakko Heinonen2011-01-031-0/+4
| | | | | | | | | | | | that setfacl(1) exits with proper exit status on failure. PR: bin/149780 Submitted by: Ævar Arnfjörð Bjarmason (original version) Reviewed by: trasz MFC after: 3 weeks Notes: svn path=/head/; revision=216922
* Typo fix: s/ommited/omittedBenedict Reuschling2010-07-271-2/+2
| | | | | | | MFC after: 4 days Notes: svn path=/head/; revision=210546
* Update authors and history.Edward Tomasz Napierala2010-05-131-1/+6
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=208035