Allow root to log in w/ password on serial console

These additional SELinux policy rules are required to allow *root* to
log in on the serial console and directly assume the `sysadm_r` role.
This commit is contained in:
2023-03-14 14:40:14 -05:00
parent 292a4d2268
commit c259aad165
2 changed files with 37 additions and 0 deletions

View File

@@ -201,3 +201,15 @@ gen_require(`
')
allow ssh_keygen_t var_lib_t:dir rw_dir_perms;
filetrans_pattern(ssh_keygen_t, var_lib_t, sshd_key_t, file)
# Allow login to execute /bin/busybox (via /bin/sh symlink)
gen_require(`
type local_login_t;
')
corecmd_exec_bin(local_login_t)
# Allow root to log in on the serial console
gen_require(`
type sysadm_t;
')
init_use_fds(sysadm_t)