Re: chflags -RL and symlinks pointing outside the traversal: preserve behavior or add a Capsicum guardrail?

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Fri, 21 Aug 2026 03:05:38 UTC
On Thu, Aug 20, 2026 at 08:51:43PM -0600, Alan Somers wrote:
> On Thu, Aug 20, 2026 at 7:49 PM Konstantin Belousov <kostikbel@gmail.com> wrote:
> >
> > IMO there must be an option to disable the capability mode.
> > Ideally, the option would be consistent across most of the utilities.
> >
> > Also, if we are talking about making the capsicum entry semi-mandatory,
> > as the first step we should remove the CAPABILITIES/CAPABILITY_MODE
> > options from kernel build. (To make it clear, make the features
> > unconditional).
> 
> I definitely agree with making capsicum mandatory in the kernel.  It's
> certainly mature enough to be required by now.  As for a switch to
> disable it, we're proposing --dereference-links-unsafely in the linked
> PR.  That name makes sense for chflags (and chmod, chown, etc), and
> doesn't assume that the user knows what "capsicum" means.  But it
> wouldn't make sense for very many utilities that don't have a -R
> option.  Would you like a different name?
> 
> https://github.com/freebsd/freebsd-src/pull/2375

I do not mind any name, as far as I can find it in the man page searching
for 'capability'.