Bug 278124 - /usr/bin/find doesn't accept "-acl" option
Summary: /usr/bin/find doesn't accept "-acl" option
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: John Baldwin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-02 06:46 UTC by Yoshiaki Kasahara
Modified: 2024-12-07 00:25 UTC (History)
3 users (show)

See Also:


Attachments
Patch to restore "-acl" option (350 bytes, patch)
2024-04-04 10:01 UTC, Yoshiaki Kasahara
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshiaki Kasahara 2024-04-02 06:46:38 UTC
/usr/bin/find doesn't accept "-acl" option.

% /usr/bin/find . -acl
find: -acl: unknown primary or operator

usr.bin/find/option.c doesn't include <sys/acl.h>, so the following line is not compiled.

#ifdef ACL_TYPE_NFS4
        { "-acl",       c_acl,          f_acl,          0 },
#endif
Comment 1 Yoshiaki Kasahara 2024-04-04 10:01:59 UTC
Created attachment 249699 [details]
Patch to restore "-acl" option

I can use "-acl" option after including <sys/acl.h> in option.c and rebuild usr.bin/find.
Comment 2 John Baldwin freebsd_committer freebsd_triage 2024-12-06 18:31:14 UTC
Thanks, I just need to make sure cross-builds still work.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-12-06 18:53:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=984add354edef8a6b4983a33f89ff62532a1556b

commit 984add354edef8a6b4983a33f89ff62532a1556b
Author:     Yoshiaki Kasahara <ykasap@gmail.com>
AuthorDate: 2024-12-06 18:27:32 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-12-06 18:29:37 +0000

    find: Re-enable the -acl primary on FreeBSD

    This was made conditional to support cross-builds, but the relevant
    header wasn't included so it was never enabled for native builds.

    PR:             278124
    Fixes:          c3a6ea5ba6b5 Allow compiling usr.bin/find on Linux and Mac

 usr.bin/find/option.c | 1 +
 1 file changed, 1 insertion(+)