/apparmor.d/sbin.dhclient3

http://github.com/brinkman83/bashrc · Unknown · 69 lines · 53 code · 16 blank · 0 comment · 0 complexity · 81f1039785395af461a9782401d763ce MD5 · raw file

  1. # vim:syntax=apparmor
  2. # Last Modified: Fri Jul 17 11:46:19 2009
  3. # Author: Jamie Strandboge <jamie@canonical.com>
  4. #include <tunables/global>
  5. /sbin/dhclient3 {
  6. #include <abstractions/base>
  7. #include <abstractions/nameservice>
  8. capability net_bind_service,
  9. capability net_raw,
  10. capability sys_module,
  11. capability dac_override,
  12. network packet,
  13. network raw,
  14. @{PROC}/*/net/ r,
  15. @{PROC}/*/net/** r,
  16. /sbin/dhclient3 mr,
  17. /etc/dhclient.conf r,
  18. /etc/dhcp3/ r,
  19. /etc/dhcp3/** r,
  20. /var/lib/dhcp3/dhclient* lrw,
  21. /var/run/dhclient*.pid lrw,
  22. /var/run/dhclient*.lease* lrw,
  23. # NetworkManager
  24. /var/run/nm*conf r,
  25. # connman
  26. /var/run/connman/dhclient*.pid lrw,
  27. /var/run/connman/dhclient*.leases lrw,
  28. # synce-hal
  29. /usr/share/synce-hal/dhclient.conf r,
  30. # if there is a custom script, let it run unconfined
  31. /etc/dhcp3/dhclient-script Uxr,
  32. # The dhclient-script shell script sources other shell scripts rather than
  33. # executing them, so we can't just use a separate profile for dhclient-script
  34. # with 'Uxr' on the hook scripts. However, for the long-running dhclient3
  35. # daemon to run arbitrary code via /sbin/dhclient-script, it would need to be
  36. # able to subvert dhclient-script or write to the hooks.d directories. As
  37. # such, if the dhclient3 daemon is subverted, this effectively limits it to
  38. # only being able to run the hooks scripts.
  39. /sbin/dhclient-script Uxr,
  40. # Run the ELF executables under their own unrestricted profiles
  41. /usr/lib/NetworkManager/nm-dhcp-client.action Pxr,
  42. /usr/lib/connman/scripts/dhclient-script Pxr,
  43. }
  44. /usr/lib/NetworkManager/nm-dhcp-client.action {
  45. #include <abstractions/base>
  46. #include <abstractions/dbus>
  47. /usr/lib/NetworkManager/nm-dhcp-client.action mr,
  48. }
  49. /usr/lib/connman/scripts/dhclient-script {
  50. #include <abstractions/base>
  51. #include <abstractions/dbus>
  52. /usr/lib/connman/scripts/dhclient-script mr,
  53. }