第8章 セキュリティーポリシーの適用
インプレースアップグレードプロセス中に、SELinux ポリシーを Permissive モードに切り替える必要があります。さらに、セキュリティープロファイルには、メジャーリリース間の変更が含まれる可能性があります。システムのセキュリティーを復元するには、SELinux を再度強制モードに切り替え、システム全体の暗号化ポリシーを確認します。特定のセキュリティープロファイルに準拠するようにシステムを修正することもできます。また、一部のセキュリティー関連コンポーネントでは、正しくアップグレードするために更新前の手順が必要です。
8.1. SELinux モードの Enforcing への変更
Leapp
ユーティリティーは、インプレースアップグレードプロセス時に SELinux モードを Permissive に設定します。システムが正常にアップグレードされたら、手動で SELinux モードを Enforcing に変更する必要があります。
前提条件
- システムをアップグレードし、アップグレード後の状態の確認 で説明されている検証を実行した。
手順
ausearch
ユーティリティーなどを使用して、SELinux 拒否がないことを確認します。ausearch -m AVC,USER_AVC -ts boot
# ausearch -m AVC,USER_AVC -ts boot
Copy to Clipboard Copied! 前述のステップは、最も一般的な環境だけを対象としたものです。考えられるすべての SELinux 拒否を確認するには、「SELinux の使用」の SELinux 拒否の特定 セクションを参照してください。このセクションでは、すべての手順が説明されています。
任意のテキストエディターで
/etc/selinux/config
ファイルを開きます。以下に例を示します。vi /etc/selinux/config
# vi /etc/selinux/config
Copy to Clipboard Copied! SELINUX=enforcing
オプションを設定します。This file controls the state of SELinux on the system. SELINUX= can take one of these three values: enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - No SELinux policy is loaded. SELINUXTYPE= can take one of these two values: targeted - Targeted processes are protected, mls - Multi Level Security protection.
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=enforcing # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted
Copy to Clipboard Copied! 変更を保存して、システムを再起動します。
reboot
# reboot
Copy to Clipboard Copied!
検証
システムの再起動後に、
getenforce
コマンドがEnforcing
を返すことを確認します。getenforce
$ getenforce Enforcing
Copy to Clipboard Copied!