Show Table of Contents
2.2. プロセスの SELinux コンテキスト
プロセスの SELinux コンテキストを表示するには、
ps -eZ コマンドを実行します。例を示します。
手順2.2 passwd ユーティリティーの SELinux コンテキストを表示する
- → → の順に選択して、端末を開きます。
passwdユーティリティーを実行します。新たなパスワードは入力しないでください。~]$passwdChanging password for user user_name. Changing password for user_name. (current) UNIX password:- 新しいタブか別の端末を開いて、以下のコマンドを実行します。出力は以下のようになります。
~]$ps -eZ | grep passwdunconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 13212 pts/1 00:00:00 passwd - 最初のタブまたは端末で
Ctrl+Cを押して、passwdユーティリティーをキャンセルします。
この例では、
passwd ユーティリティーの実行時 (passwd_exec_t タイプのラベルが付けられている) にユーザーのシェルプロセスが passwd_t ドメインに移行します。タイプはプロセスのドメインとファイルのタイプを定義することに留意してください。
実行中のすべてのプロセスについての SELinux コンテキストを表示するには、再度
ps ユーティリティーを実行します。以下の出力例は省略されており、システムによっては異なる場合があることに注意してください。
]$ps -eZsystem_u:system_r:dhcpc_t:s0 1869 ? 00:00:00 dhclient system_u:system_r:sshd_t:s0-s0:c0.c1023 1882 ? 00:00:00 sshd system_u:system_r:gpm_t:s0 1964 ? 00:00:00 gpm system_u:system_r:crond_t:s0-s0:c0.c1023 1973 ? 00:00:00 crond system_u:system_r:kerneloops_t:s0 1983 ? 00:00:05 kerneloops system_u:system_r:crond_t:s0-s0:c0.c1023 1991 ? 00:00:00 atd
system_r ロールがデーモンなどのシステムプロセスに使われています。その後に、Type Enforcement が各ドメインを分離しています。

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.