Show Table of Contents
5.12.4. Polyinstantiated ディレクトリーの設定
/tmp および /var/tmp ディレクトリーは通常、すべてのプログラム、サービス、ユーザーが一時的なストレージとして使用します。しかしこの設定では、これらのディレクトリーは競合状態の攻撃やファイル名に基づく情報漏えいに対して脆弱となってしまいます。SELinux は、polyinstantiated ディレクトリーという形で解決法を提供します。これはつまり、/tmp と /var/tmp の両方がインスタンス化され、各ユーザーにはプライベートのように見えるということです。ディレクトリーのインスタンス化が有効になると、各ユーザーの /tmp と /var/tmp ディレクトリーは自動的に /tmp-inst および /var/tmp/tmp-inst 下にマウントされます。
ディレクトリーの polyinstantiation を有効にするには、以下のステップにしたがいます。
/etc/security/namespace.confファイルの最後の 3 行をコメント解除し、/tmp、/var/tmp、ユーザーのホームディレクトリーのインスタンス化を有効にします。~]$
tail -n 3 /etc/security/namespace.conf/tmp /tmp-inst/ level root,adm /var/tmp /var/tmp/tmp-inst/ level root,adm $HOME $HOME/$USER.inst/ level/etc/pam.d/loginファイルでpam_namespace.soがセッション用に設定されていることを確認します。~]$
grep namespace /etc/pam.d/loginsession required pam_namespace.so- システムを再起動します。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.