1. 02 3月, 2009 1 次提交
  2. 23 2月, 2009 1 次提交
    • P
      selinux: Fix the NetLabel glue code for setsockopt() · 09c50b4a
      Paul Moore 提交于
      At some point we (okay, I) managed to break the ability for users to use the
      setsockopt() syscall to set IPv4 options when NetLabel was not active on the
      socket in question.  The problem was noticed by someone trying to use the
      "-R" (record route) option of ping:
      
       # ping -R 10.0.0.1
       ping: record route: No message of desired type
      
      The solution is relatively simple, we catch the unlabeled socket case and
      clear the error code, allowing the operation to succeed.  Please note that we
      still deny users the ability to override IPv4 options on socket's which have
      NetLabel labeling active; this is done to ensure the labeling remains intact.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      09c50b4a
  3. 10 10月, 2008 5 次提交
  4. 21 4月, 2008 1 次提交
    • E
      SELinux: netlabel.c whitespace, syntax, and static declaraction cleanups · a6aaafee
      Eric Paris 提交于
      This patch changes netlabel.c to fix whitespace and syntax issues.  Things that
      are fixed may include (does not not have to include)
      
      whitespace at end of lines
      spaces followed by tabs
      spaces used instead of tabs
      spacing around parenthesis
      locateion of { around struct and else clauses
      location of * in pointer declarations
      removal of initialization of static data to keep it in the right section
      useless {} in if statemetns
      useless checking for NULL before kfree
      fixing of the indentation depth of switch statements
      and any number of other things I forgot to mention
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      a6aaafee
  5. 18 4月, 2008 2 次提交
  6. 30 1月, 2008 3 次提交
  7. 22 1月, 2008 1 次提交
  8. 02 8月, 2007 1 次提交
  9. 19 7月, 2007 2 次提交
    • P
      SELinux: use SECINITSID_NETMSG instead of SECINITSID_UNLABELED for NetLabel · f36158c4
      Paul Moore 提交于
      These changes will make NetLabel behave like labeled IPsec where there is an
      access check for both labeled and unlabeled packets as well as providing the
      ability to restrict domains to receiving only labeled packets when NetLabel is
      in use.  The changes to the policy are straight forward with the following
      necessary to receive labeled traffic (with SECINITSID_NETMSG defined as
      "netlabel_peer_t"):
      
       allow mydom_t netlabel_peer_t:{ tcp_socket udp_socket rawip_socket } recvfrom;
      
      The policy for unlabeled traffic would be:
      
       allow mydom_t unlabeled_t:{ tcp_socket udp_socket rawip_socket } recvfrom;
      
      These policy changes, as well as more general NetLabel support, are included in
      the latest SELinux Reference Policy release 20070629 or later.  Users who make
      use of NetLabel are strongly encouraged to upgrade their policy to avoid
      network problems.  Users who do not make use of NetLabel will not notice any
      difference.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      f36158c4
    • P
      SELinux: enable dynamic activation/deactivation of NetLabel/SELinux enforcement · 23bcdc1a
      Paul Moore 提交于
      Create a new NetLabel KAPI interface, netlbl_enabled(), which reports on the
      current runtime status of NetLabel based on the existing configuration.  LSMs
      that make use of NetLabel, i.e. SELinux, can use this new function to determine
      if they should perform NetLabel access checks.  This patch changes the
      NetLabel/SELinux glue code such that SELinux only enforces NetLabel related
      access checks when netlbl_enabled() returns true.
      
      At present NetLabel is considered to be enabled when there is at least one
      labeled protocol configuration present.  The result is that by default NetLabel
      is considered to be disabled, however, as soon as an administrator configured
      a CIPSO DOI definition NetLabel is enabled and SELinux starts enforcing
      NetLabel related access controls - including unlabeled packet controls.
      
      This patch also tries to consolidate the multiple "#ifdef CONFIG_NETLABEL"
      blocks into a single block to ease future review as recommended by Linus.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      23bcdc1a
  10. 14 7月, 2007 1 次提交
  11. 12 7月, 2007 1 次提交
    • P
      SELinux: use SECINITSID_NETMSG instead of SECINITSID_UNLABELED for NetLabel · 9faf65fb
      Paul Moore 提交于
      These changes will make NetLabel behave like labeled IPsec where there is an
      access check for both labeled and unlabeled packets as well as providing the
      ability to restrict domains to receiving only labeled packets when NetLabel
      is in use.  The changes to the policy are straight forward with the
      following necessary to receive labeled traffic (with SECINITSID_NETMSG
      defined as "netlabel_peer_t"):
      
       allow mydom_t netlabel_peer_t:{ tcp_socket udp_socket rawip_socket } recvfrom;
      
      The policy for unlabeled traffic would be:
      
       allow mydom_t unlabeled_t:{ tcp_socket udp_socket rawip_socket } recvfrom;
      
      These policy changes, as well as more general NetLabel support, are included
      in the SELinux Reference Policy SVN tree, r2352 or later.  Users who enable
      NetLabel support in the kernel are strongly encouraged to upgrade their
      policy to avoid network problems.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      9faf65fb
  12. 09 6月, 2007 1 次提交
  13. 26 4月, 2007 1 次提交