On RHEL this is done by default via SELinux.
If you define a policy that prevents anyone from doing kexec, and enable the boolean to prevent root from disabling enforcing mode for selinux, there you go, done with tools that have been available for ~15-20 years.
It's a great mechanism in theory, but the practice leaves much to be desired.
FWIW it does look like Gentoo stepped up and filled in the gaps since I last looked. Their Wiki has good docs starting from https://wiki.gentoo.org/wiki/SELinux.
If you dumb it down too much it becomes useless. Simple tools usually get their simplicity by making some choices for you. You don't always want that.
SELinux is one of those things where you don't want that.
That being said, without diving too much, I have configured many custom services to run under SELinux by just running them in a dev/staging environment, collecting violations and creating policies via the audit2allow tool. So yeah, things have improved I guess.
Good documentation and good tools would encourage more people to use it and understand it willingly and effectively.
That being said, it can be configured that way but (of course, duh) it’s not the default setting.
I’ll stop replying here because this branch of the discussion doesn’t seem to be any constructive on your side (or even conducted in good faith, to be honest)
There is no such line. Everything is foss software, you can change any policy.
You can still do everything you want.
We're fundamentally talking about building up pieces in a "chain of trust" which allows the entity in charge of the UEFI to decide what can and can't be done with the system. That's a scary thing.
>Isn't that arguing for the iOS-ification of Linux?
Linux distros could learn a thing or two (or 100) from how iOS handles security.
Doesn't need to be fiddled with? Sure. Can't be fiddled with? No way.
> Hardware owners shouldn't have to be the ones fixing the operating system.
Ditto. Owners shouldn't have to fix it, but they should be able to.
> Most people just want their computer to work and don't want to learn about the internals of how it works.
Most people, sure. So don't make them learn. But don't prevent people from learning if they want to.
> If a user really cares about changing the internals he can make his own operating system.
Wouldn't this mean that incremental improvements wouldn't be possible anymore?
> Linux distros could learn a thing or two (or 100) from how iOS handles security.
How so specifically?
One can make a fork of the distro and then make the change you want to incrementally improve it.
>How so specifically?
Reading the documentation and reading information about its internals.
How is that better than what we have now, where a system can be easily modified in-place without every distro needing dozens of forks for each slight preference change?
What exactly is it you're advocating for?
Because most Linux distros have terrible security.
>How is that better than what we have now, where a system can be easily modified in-place without every distro needing dozens of forks for each slight preference change?
Preferences can be done via configuration. Most people do not actually want or need to modify the operating system.
>What exactly is it you're advocating for?
The root user to be effectively removed.
Sorry no, I don't want my Linux to become like iOS. iOS security model "all powers to the manufacturer" is broken model and doesn't work.
Don't we already have that, and it's called... Linux?
They do. That way is exposing files in /etc that the administrator account can edit.
Or, labeled differently, the root user is the administrator group.
That said there’s nothing stopping you from trying it. It just seems unlikely to succeed.
>Trying to guess what use-case everybody will have is a horrible tooth-pulling and bikesheding exercise that nobody would do for fun.
You seem to be misunderstanding what I am saying. People could still install new applications, or uninstall preexisting applications just like how it works now.
If the solution is just "use sudo" then what's the difference compared to today's model?
That would be okay too, but not all suid usages can be replaced like that.
>And how would "su" and "sudo" work in your model?
They wouldn't exist in my model.