core-agent-linux/passwordless-root
Demi Marie Obenour 188ea74993
sudo isn’t always built with SELinux support
Red Hat- and Debian- derived distributions support SELinux, and so their
sudo packages are built with SELinux support.  However, other
distributions (notably Arch) build sudo without SELinux.  Such sudo
builds will fail to parse the `ROLE=unconfined_r TYPE=unconfined_t`
string added in 0fac1aa45c.  They *can*
parse `role=unconfined_r, type=unconfined_t` in `Defaults`, but that
causes problems on some Fedora 33 systems if SELinux is turned off and
the root account is locked.

To solve both of these problems at once, we install a different
`/etc/sudoers.d/qubes` file depending on the distribution.  As a
heuristic, we use the presents of `/etc/redhat-release` or
`/etc/debian_version`.  If either is present, sudo probably supports
SELinux, and we should include the corresponding entries.  If both are
missing, then we shouldn’t risk it.  The `qubes.sudoers` file in the git
repository includes the full file (with SELinux); we use `sed` to strip
the SELinux portion when needed.
2021-01-11 04:23:38 -05:00
..
Makefile sudo isn’t always built with SELinux support 2021-01-11 04:23:38 -05:00
pam-configs_su.qubes Override PAM config for su in RPM package 2020-05-07 17:01:02 +02:00
pam.d_su.qubes Override PAM config for su in RPM package 2020-05-07 17:01:02 +02:00
polkit-1-qubes-allow-all.pkla passwordless-root: policykit: restrict access to group qubes 2020-09-13 14:16:07 +00:00
polkit-1-qubes-allow-all.rules Only give the “qubes” group full Polkit access 2020-12-24 15:46:08 -05:00
qubes.sudoers Fix sudo SELinux settings 2021-01-08 05:21:19 +01:00