logo

apparmor.d

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/apparmor.d.git

usr.lib.apache2.mpm-prefork.apache2 (2122B)


  1. # Author: Marc Deslauriers <marc.deslauriers@ubuntu.com>
  2. abi <abi/3.0>,
  3. include <tunables/global>
  4. /usr/lib/apache2/mpm-prefork/apache2 {
  5. # This profile is completely permissive.
  6. # It is designed to target specific applications using mod_apparmor,
  7. # hats, and the apache2.d directory.
  8. #
  9. # In order to enable this profile, you must:
  10. #
  11. # 1- Enable it:
  12. # sudo aa-enforce /etc/apparmor.d/usr.lib.apache2.mpm-prefork.apache2
  13. #
  14. # 2- Load the mod_apparmor module:
  15. # sudo a2enmod apparmor
  16. #
  17. # 3- Place an appropriate profile containing the desired hat in the
  18. # /etc/apparmor.d/apache2.d directory. Such profiles should probably
  19. # include the "apache2-common" abstraction.
  20. #
  21. # 4- Use the "AADefaultHatName" apache configuration option to specify a
  22. # hat to be used for a given apache virtualhost or "AAHatName" for
  23. # a given apache directory or location directive.
  24. #
  25. #
  26. # There is an example profile for phpsysinfo included in the
  27. # apparmor-profiles package. To try it:
  28. #
  29. # 1- Install the phpsysinfo and the apparmor-profiles packages:
  30. # sudo apt-get install phpsysinfo apparmor-profiles
  31. #
  32. # 2- Enable the main apache2 profile
  33. # sudo aa-enforce /etc/apparmor.d/usr.lib.apache2.mpm-prefork.apache2
  34. #
  35. # 3- Configure apache with the following:
  36. # <Directory /var/www/phpsysinfo/>
  37. # AAHatName phpsysinfo
  38. # </Directory>
  39. #
  40. include <abstractions/base>
  41. include <abstractions/nameservice>
  42. capability chown,
  43. capability kill,
  44. capability net_bind_service,
  45. capability setgid,
  46. capability setuid,
  47. capability sys_tty_config,
  48. / rw,
  49. /** mrwlkix,
  50. ^DEFAULT_URI {
  51. include <abstractions/base>
  52. include <abstractions/nameservice>
  53. / rw,
  54. /** mrwlkix,
  55. }
  56. ^HANDLING_UNTRUSTED_INPUT {
  57. include <abstractions/nameservice>
  58. / rw,
  59. /** mrwlkix,
  60. }
  61. # This directory contains web application
  62. # package-specific apparmor files.
  63. include <apache2.d>
  64. # Site-specific additions and overrides. See local/README for details.
  65. include if exists <local/usr.lib.apache2.mpm-prefork.apache2>
  66. }