SELinux アクセスが拒否されました。

SELinux アクセスが拒否されました。

エラーレポートにSELinuxからこのメッセージが表示され続けます。私はFedora 13を実行しており、継続して学んでいます。原因は何ですか?

Summary:

SELinux is preventing /usr/sbin/semodule access to a leaked /tmp/tmpGTbWYh file
descriptor.

Detailed Description:

[semodule has a permissive type (semanage_t). This access was not denied.]

SELinux denied access requested by the semodule command. It looks like this is
either a leaked descriptor or semodule output was redirected to a file it is not
allowed to access. Leaks usually can be ignored since SELinux is just closing
the  leak and reporting the error. The application does not use the descriptor,
so it will run properly. If this is a redirection, you will not get output in
the /tmp/tmpGTbWYh. You should generate a bugzilla on selinux-policy, and it
will get routed to the appropriate package. You can safely ignore this avc.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385)

Additional Information:

Source Context                system_u:system_r:semanage_t:s0-s0:c0.c1023
Target Context                system_u:object_r:initrc_tmp_t:s0
Target Objects                /tmp/tmpGTbWYh [ file ]
Source                        semodule
Source Path                   /usr/sbin/semodule
Port                          <Unknown>
Source RPM Packages           policycoreutils-2.0.83-28.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-62.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks

ベストアンサー1

おそらくシステムアップデート後にこの現象が発生したようですが、再起動後は一時ファイルが通常必要ないため、そのファイルを削除してみました。

fuser /tmp/tmpGTbWYh 

このコマンドを使用すると、ファイルがプロセスで使用されていることを確認でき、1つ以上の数値(プロセスID、PID)が提供されます。

数字がないと、プロセスは使用されず、ファイルを安全に削除できることを意味します。

rm /tmp/tmpGTbWYh

このタスクを実行する権限を持つユーザー(あなたのユーザー?root?)で上記のタスクを実行します。 lsで確認できます。

ls -l /tmp/tmpGTbWYh

ファイルがプロセスで使用されている場合は、psを実行し、fusionrを実行したときに見つけたPIDごとにフィルタリングできます。

ps -ef | grep $PID

$ PIDを上記で見つけた番号に置き換える必要があります(フューザを使用)。

この時点で可能かどうかを判断し、アプリケーションがファイルを使用していることを確認し、ファイルを閉じる(可能であれば)プロセスを終了するか($ PIDを終了する)、ファイルを削除する必要があります(危険な場合があります)。

決定を下すのが難しい場合はお知らせください。

おすすめ記事