From nobody Fri Aug 21 03:05:38 2026 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hR4v34vxxz6pc0F for ; Fri, 21 Aug 2026 03:05:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4hR4v314Cbz3JZb; Fri, 21 Aug 2026 03:05:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 67L35ciT095605; Fri, 21 Aug 2026 06:05:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 67L35ciT095605 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 67L35cll095604; Fri, 21 Aug 2026 06:05:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 21 Aug 2026 06:05:38 +0300 From: Konstantin Belousov To: Alan Somers Cc: Mark Johnston , Jitendra Bhati , freebsd-hackers@freebsd.org Subject: Re: chflags -RL and symlinks pointing outside the traversal: preserve behavior or add a Capsicum guardrail? Message-ID: References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Rspamd-Queue-Id: 4hR4v314Cbz3JZb X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Spamd-Bar: ---- On Thu, Aug 20, 2026 at 08:51:43PM -0600, Alan Somers wrote: > On Thu, Aug 20, 2026 at 7:49 PM Konstantin Belousov 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'.