対象とするUbuntuのバージョン
- 9.10
|
用語
- プロファイル
ファイル読み込みの許可、拒否等に関する設定を書いたファイル。/etc/apparmor.d/以下にある。直接編集できる。
モード
- Complain
- 学習モード
- Enforce
- 強制モード
コマンド
- apparmor_status
- 現在の状態
- complain|aa-complain executable
- executable を Complain モードにする
- enforce|aa-enforce executable
- executable を Enforce モードにする
- genprof|aa-genprof executable
プロファイルを作成する。man genprof
- logprof|aa-logprof
プロファイルを反映させる。man logprof
Profile: /path/to/executable Path: /path/to/file/or/directory Mode: [rwlka....] Severity: unknown or num [1 - /path/to/file/or/directory] [(A)llow] / (D)eny / (G)lob / Glob w/(E)xt / (N)ew / Abo(r)t / (F)inish / (O)pts
- Allow
- 許可
- Deny
- 拒否
- Glob
- そのファイルを含むような Glob を作る。
- Glob w/Ext
- Edit
- 表示されているパスを元に編集する。
- Abort
- 中止
- Finish
- 終了
r |
read |
w |
write |
l |
link |
k |
lock |
a |
append |
execute |
|
ix |
プロファイルを引き継ぐ |
px |
プロファイルを分ける with environment scrubbing |
Px |
プロファイルを分ける without environment scrubbing |
ux |
Allow execution of an application unconfined, with environment scrubbing |
Ux |
Allow execution of an application unconfined, without environment scrubbing |
m |
allow executable mapping |
Firefoxのプロファイルの一部
/usr/lib/firefox-3.5.*/firefox { #include <abstractions/audio> # ↑ は /etc/apparmor.d/abstractions/audio に書かれたものを読み込んでいるみたい。 # ---- /usr/lib/** rm, /bin/bash ixr, /bin/dash ixr, /bin/grep ixr, /bin/ps Uxr, # ---- # evince has its own profile, so change to it /usr/bin/evince PUxr, # ---- # miscellaneous #/usr/bin/eog Uxr, /usr/bin/gedit Uxr, /usr/bin/gimp* Uxr, # ---- # allow read and write to all user's files, except explicitly denied ones @{HOME}/ r, @{HOME}/** rw, # ↑ の @{HOME} は/etc/appamor.d/tunables/home に書かれている。 }
リンク
- Nobell版に関する説明みたい。
プロファイルのリポジトリ
[http://bazaar.launchpad.net/~ubuntu-core-dev/apparmor/profiles-devel/files lauchpad.net のプロファイルのリポジトリ