## URLに使われるページ名はアルファベット(WikiName形式)を用いる ## 以下のタイトルを内容に沿ったものに変更する #title AppArmorに関するメモ ## 「6.06 Dapper Drake」といった形式で箇条書きにする ## バージョン非依存のTipの場合は「すべて」と記述 * '''対象とするUbuntuのバージョン''' * 9.10 ## || /!\ 単なるメモ以上のことを期待しないでください。 || == 用語 == プロファイル:: ファイル読み込みの許可、拒否等に関する設定を書いたファイル。{{{/etc/apparmor.d/}}}以下にある。直接編集できる。 == モード == Complain:: 学習モード Enforce:: 強制モード == コマンド == apt:apparmor-profiles apparmor_status:: 現在の状態 complain|aa-complain executable:: executable を Complain モードにする enforce|aa-enforce executable:: executable を Enforce モードにする genprof|aa-genprof executable:: プロファイルを作成する。[[http://manpages.ubuntu.com/cgi-bin/search.py?cx=003883529982892832976%3A5zl6o8w6f0s&cof=FORID%3A9&ie=UTF-8&q=aa-genprof&titles=Title&lr=lang_en&siteurl=manpages.ubuntu.com%2F|man genprof]] logprof|aa-logprof:: プロファイルを反映させる。[[http://manpages.ubuntu.com/cgi-bin/search.py?cx=003883529982892832976%3A5zl6o8w6f0s&cof=FORID%3A9&ie=UTF-8&q=+++++%0D%0Alogprof&titles=Title&lr=lang_en&siteurl=manpages.ubuntu.com%252F|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 # ↑ は /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 に書かれている。 } }}} == リンク == * https://help.ubuntu.com/community/AppArmor * http://ubuntuforums.org/showthread.php?t=1008906 * [[http://www.novell.com/documentation/apparmor/?page=/documentation/apparmor/apparmor_user/data/bktitleuser.html|Novell AppArmor]] * Nobell版に関する説明みたい。 * [[http://ubulog.blogspot.com/2009/06/ubuntu-apparmor.html|ubuntuで AppArmor を使ってセキュアな環境を構築する]] === プロファイルのリポジトリ === * [http://bazaar.launchpad.net/~ubuntu-core-dev/apparmor/profiles-devel/files lauchpad.net のプロファイルのリポジトリ * [[http://bodhizazen.net/aa-profiles/|プロファイルのリポジトリ]] * [[file:///usr/share/doc/apparmor-profiles/extras|ローカル]]