home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / etc / apparmor.d / sbin.dhclient3 < prev    next >
Encoding:
Text File  |  2009-03-31  |  1.9 KB  |  71 lines

  1. # vim:syntax=apparmor
  2. # Last Modified: Thu Feb 24 08:46:21 2009
  3. # Author: Jamie Strandboge <jamie@canonical.com>
  4. #include <tunables/global>
  5.  
  6. /sbin/dhclient3 {
  7.   #include <abstractions/base>
  8.   #include <abstractions/nameservice>
  9.  
  10.   capability net_bind_service,
  11.   capability net_raw,
  12.   capability sys_module,
  13.   capability dac_override,
  14.  
  15.   network packet,
  16.   network raw,
  17.  
  18.   @{PROC}/*/net/ r,
  19.   @{PROC}/*/net/** r,
  20.  
  21.   /sbin/dhclient3 mr,
  22.  
  23.   /etc/dhclient.conf r,
  24.   /etc/dhcp3/ r,
  25.   /etc/dhcp3/** r,
  26.  
  27.   /var/lib/dhcp3/dhclient* lrw,
  28.   /var/run/dhclient*.pid lrw,
  29.  
  30.   # NetworkManager
  31.   /var/run/nm*conf r,
  32.  
  33.   # connman
  34.   /var/run/connman/dhclient*.pid lrw,
  35.   /var/run/connman/dhclient*.leases lrw,
  36.  
  37.   # if there is a custom script, let it run unconfined
  38.   /etc/dhcp3/dhclient-script Uxr,
  39.  
  40.   # run under its own profile, and clean the environment
  41.   /sbin/dhclient-script                           Pxr,
  42.   /usr/lib/NetworkManager/nm-dhcp-client.action   Pxr,
  43.   /usr/lib/connman/scripts/dhclient-script        Pxr,
  44. }
  45.  
  46. /sbin/dhclient-script {
  47.   # dhclient-script sources other shell scripts rather than executing them, so
  48.   # we can't just use 'Uxr' on the hook scripts. However, for the long-running
  49.   # dhclient3 daemon to run arbitrary code via the unconfined shells below, it
  50.   # would need to be able to subvert dhclient-script or write to the hooks.d
  51.   # directories. As such, if the dhclient3 daemon is subverted, this
  52.   # effectively limits it to only being able to run the hooks scripts.
  53.   /bin/bash                  Uxr,
  54.   /bin/dash                  Uxr,
  55.  
  56.   /sbin/dhclient-script      mr,
  57. }
  58.  
  59. /usr/lib/NetworkManager/nm-dhcp-client.action {
  60.   #include <abstractions/base>
  61.   #include <abstractions/dbus>
  62.   /usr/lib/NetworkManager/nm-dhcp-client.action mr,
  63. }
  64.  
  65. /usr/lib/connman/scripts/dhclient-script {
  66.   #include <abstractions/base>
  67.   #include <abstractions/dbus>
  68.   /usr/lib/connman/scripts/dhclient-script      mr,
  69. }
  70.  
  71.