Page MenuHomeFreeBSD

Allow the location of capabilities.conf to be configured.
ClosedPublic

Authored by brooks on Nov 9 2018, 9:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 1 2024, 9:41 AM
Unknown Object (File)
May 1 2024, 9:41 AM
Unknown Object (File)
May 1 2024, 9:41 AM
Unknown Object (File)
May 1 2024, 1:18 AM
Unknown Object (File)
Jan 11 2024, 10:49 PM
Unknown Object (File)
Jan 8 2024, 12:19 AM
Unknown Object (File)
Dec 22 2023, 9:46 PM
Unknown Object (File)
Dec 22 2023, 12:55 PM
Subscribers

Details

Summary

Also allow a per-abi syscall prefix to be configured with the
abi_func_prefix syscalls.conf variable and check syscalls against
entries in capabilities.conf with and without the prefix amended.

Take advantage of these two features to allow use shared capabilities.conf
between the default syscall vector and the freebsd32 compatability
layer. We've been inconsistent about keeping the two in sync as
evidenced by the bugs fixed in r340294. This eliminates that problem
going forward.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note, with rS340294 already applied make sysent makes no changes after this change.

Does it mean that if we have both foo and freebsd32_foo, then we cannot selectively enable only one of them for cap mode ?

In D17932#383019, @kib wrote:

Does it mean that if we have both foo and freebsd32_foo, then we cannot selectively enable only one of them for cap mode ?

I think that's probably fine, although maybe we should generate a warning or error if both exist?

In D17932#383019, @kib wrote:

Does it mean that if we have both foo and freebsd32_foo, then we cannot selectively enable only one of them for cap mode ?

Yes. I can't imagine a situation where we'd want to do that.

In D17932#383019, @kib wrote:

Does it mean that if we have both foo and freebsd32_foo, then we cannot selectively enable only one of them for cap mode ?

I think that's probably fine, although maybe we should generate a warning or error if both exist?

That would fail today with mknodat/freebsd32_mknodat.

In D17932#383019, @kib wrote:

Does it mean that if we have both foo and freebsd32_foo, then we cannot selectively enable only one of them for cap mode ?

Yes. I can't imagine a situation where we'd want to do that.

I can imagine a situation where we have COMPAT# and regular versions and want to handle them differently, but this change doesn't effect that. foo and freebsd32_foo being different would defiantly be a bug if there wasn't an analog in the default syscall table.

In any case, you can always enable a syscall for capabilities and then reject calls in CAP_MODE from the handler.

This revision is now accepted and ready to land.Nov 13 2018, 6:51 AM
This revision was automatically updated to reflect the committed changes.