Re: ENOTCAPABLE returned without Capsicum

2021-05-15 Thread Peter Jeremy via freebsd-stable
On 2021-May-16 11:48:24 +1000, Peter Jeremy via freebsd-stable 
 wrote:
>I am running 13-stable from a couple of weeks ago, without Capsicum
>(neither CAPABILITY_MODE nor CAPABILITIES are specified in my kernel).
>Despite this, I am getting Capsicum-related errors.  As an example:
>openat(AT_FDCWD, "/")
>will return ENOTCAPABLE.

Please ignore.  I worked out I was misreading how O_RESOLVE_BENEATH
worked.

-- 
Peter Jeremy


signature.asc
Description: PGP signature


ENOTCAPABLE returned without Capsicum

2021-05-15 Thread Peter Jeremy via freebsd-stable
I am running 13-stable from a couple of weeks ago, without Capsicum
(neither CAPABILITY_MODE nor CAPABILITIES are specified in my kernel).
Despite this, I am getting Capsicum-related errors.  As an example:
openat(AT_FDCWD, "/")
will return ENOTCAPABLE.

Rummaging around the sources, it seems that there's a non-trivial
amount of code in kern/vfs_lookup.c that's capable of returning
capability-related errors but isn't protected by CAPABILITY_MODE.
This seems undesirable since it means that FreeBSD is defaulting to
being locked down but unless I build it with Capsicum, there's no
way to change the processes capabilities.

-- 
Peter Jeremy


signature.asc
Description: PGP signature