Skip to content

Commit

Permalink
Confine vsftpd systemd system generator
Browse files Browse the repository at this point in the history
Resolves: rhbz#2317180
  • Loading branch information
zpytela committed Dec 17, 2024
1 parent 0d528ae commit d2ac9ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions policy/modules/system/systemd.fc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ HOME_DIR/\.config/systemd/user(/.*)? gen_context(system_u:object_r:systemd_unit
/usr/lib/systemd/system-generators/systemd-ssh-generator -- gen_context(system_u:object_r:systemd_ssh_generator_exec_t,s0)
/usr/lib/systemd/system-generators/systemd-sysv-generator -- gen_context(system_u:object_r:systemd_sysv_generator_exec_t,s0)
/usr/lib/systemd/system-generators/systemd-tpm2-generator -- gen_context(system_u:object_r:systemd_tpm2_generator_exec_t,s0)
/usr/lib/systemd/system-generators/systemd-vsftpd-generator -- gen_context(system_u:object_r:systemd_vsftpd_generator_exec_t,s0)
/usr/lib/systemd/system-generators/zram-generator -- gen_context(system_u:object_r:systemd_zram_generator_exec_t,s0)
/usr/lib/systemd/system-generators/.+ -- gen_context(system_u:object_r:systemd_generic_generator_exec_t,s0)
/usr/lib/systemd/zram-generator.conf -- gen_context(system_u:object_r:systemd_zram_generator_conf_t,s0)
Expand Down
10 changes: 10 additions & 0 deletions policy/modules/system/systemd.te
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ systemd_generator_template(systemd_ssh_generator)
systemd_generator_template(systemd_sysv_generator)
# tpm2-generator
systemd_generator_template(systemd_tpm2_generator)
# vsftpd-generator
systemd_generator_template(systemd_vsftpd_generator)
# zram-generator
systemd_generator_template(systemd_zram_generator)
type systemd_zram_generator_conf_t;
Expand Down Expand Up @@ -1396,6 +1398,14 @@ init_read_script_files(systemd_sysv_generator_t)
### tpm2 generator
dev_read_sysfs(systemd_tpm2_generator_t)

### vsftpd generator
corecmd_exec_bin(systemd_vsftpd_generator_t)
corecmd_exec_shell(systemd_vsftpd_generator_t)

optional_policy(`
auth_dontaudit_read_passwd_file(systemd_vsftpd_generator_t)
')

### zram generator
allow systemd_zram_generator_t systemd_fstab_generator_unit_file_t:file write_file_perms;
permissive systemd_zram_generator_t;
Expand Down

0 comments on commit d2ac9ff

Please sign in to comment.