From 2354b4f1be4ad7364b43031c4e4fad4d66522e41 Mon Sep 17 00:00:00 2001 From: Kenton Groombridge Date: Wed, 7 Dec 2022 11:00:03 -0500 Subject: [PATCH] postfix, sasl: allow postfix smtp daemon to read SASL keytab Signed-off-by: Kenton Groombridge --- policy/modules/services/postfix.te | 1 + policy/modules/services/sasl.if | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/policy/modules/services/postfix.te b/policy/modules/services/postfix.te index c84190294..205f4ce2d 100644 --- a/policy/modules/services/postfix.te +++ b/policy/modules/services/postfix.te @@ -839,6 +839,7 @@ optional_policy(` optional_policy(` sasl_connect(postfix_smtpd_t) + sasl_read_keytab(postfix_smtpd_t) ') optional_policy(` diff --git a/policy/modules/services/sasl.if b/policy/modules/services/sasl.if index e1e15648f..87caf806e 100644 --- a/policy/modules/services/sasl.if +++ b/policy/modules/services/sasl.if @@ -19,6 +19,25 @@ interface(`sasl_connect',` stream_connect_pattern($1, saslauthd_runtime_t, saslauthd_runtime_t, saslauthd_t) ') +######################################## +## +## Read SASL keytab files. +## +## +## +## Domain allowed access. +## +## +# +interface(`sasl_read_keytab',` + gen_require(` + type saslauthd_keytab_t; + ') + + files_search_etc($1) + read_files_pattern($1, saslauthd_keytab_t, saslauthd_keytab_t) +') + ######################################## ## ## All of the rules required to