1. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  2. 12 2月, 2007 1 次提交
  3. 27 1月, 2007 1 次提交
  4. 24 1月, 2007 1 次提交
  5. 09 1月, 2007 2 次提交
  6. 03 1月, 2007 1 次提交
  7. 08 12月, 2006 2 次提交
  8. 03 12月, 2006 5 次提交
    • J
      Rename class_destroy to avoid namespace conflicts. · 6cbda6b6
      James Morris 提交于
      We're seeing increasing namespace conflicts between the global
      class_destroy() function declared in linux/device.h, and the private
      function in the SELinux core code.  This patch renames the SELinux
      function to cls_destroy() to avoid this conflict.
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      6cbda6b6
    • P
      NetLabel: convert to an extensibile/sparse category bitmap · 02752760
      Paul Moore 提交于
      The original NetLabel category bitmap was a straight char bitmap which worked
      fine for the initial release as it only supported 240 bits due to limitations
      in the CIPSO restricted bitmap tag (tag type 0x01).  This patch converts that
      straight char bitmap into an extensibile/sparse bitmap in order to lay the
      foundation for other CIPSO tag types and protocols.
      
      This patch also has a nice side effect in that all of the security attributes
      passed by NetLabel into the LSM are now in a format which is in the host's
      native byte/bit ordering which makes the LSM specific code much simpler; look
      at the changes in security/selinux/ss/ebitmap.c as an example.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      02752760
    • P
      SELinux: peer secid consolidation for external network labeling · 3de4bab5
      Paul Moore 提交于
      Now that labeled IPsec makes use of the peer_sid field in the
      sk_security_struct we can remove a lot of the special cases between labeled
      IPsec and NetLabel.  In addition, create a new function,
      security_skb_extlbl_sid(), which we can use in several places to get the
      security context of the packet's external label which allows us to further
      simplify the code in a few places.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      3de4bab5
    • P
      NetLabel: SELinux cleanups · 9f2ad665
      Paul Moore 提交于
      This patch does a lot of cleanup in the SELinux NetLabel support code.  A
      summary of the changes include:
      
      * Use RCU locking for the NetLabel state variable in the skk_security_struct
        instead of using the inode_security_struct mutex.
      * Remove unnecessary parameters in selinux_netlbl_socket_post_create().
      * Rename selinux_netlbl_sk_clone_security() to
        selinux_netlbl_sk_security_clone() to better fit the other NetLabel
        sk_security functions.
      * Improvements to selinux_netlbl_inode_permission() to help reduce the cost of
        the common case.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      9f2ad665
    • P
      NetLabel: make netlbl_lsm_secattr struct easier/quicker to understand · 701a90ba
      Paul Moore 提交于
      The existing netlbl_lsm_secattr struct required the LSM to check all of the
      fields to determine if any security attributes were present resulting in a lot
      of work in the common case of no attributes.  This patch adds a 'flags' field
      which is used to indicate which attributes are present in the structure; this
      should allow the LSM to do a quick comparison to determine if the structure
      holds any security attributes.
      
      Example:
      
       if (netlbl_lsm_secattr->flags)
      	/* security attributes present */
       else
      	/* NO security attributes present */
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      701a90ba
  9. 29 11月, 2006 3 次提交
    • C
      SELinux: validate kernel object classes and permissions · b94c7e67
      Chad Sellers 提交于
      This is a new object class and permission validation scheme that validates
      against the defined kernel headers. This scheme allows extra classes
      and permissions that do not conflict with the kernel definitions to be
      added to the policy. This validation is now done for all policy loads,
      not just subsequent loads after the first policy load.
      
      The implementation walks the three structrures containing the defined
      object class and permission values and ensures their values are the
      same in the policy being loaded. This includes verifying the object
      classes themselves, the permissions they contain, and the permissions
      they inherit from commons. Classes or permissions that are present in the
      kernel but missing from the policy cause a warning (printed to KERN_INFO)
      to be printed, but do not stop the policy from loading, emulating current
      behavior. Any other inconsistencies cause the load to fail.
      Signed-off-by: NChad Sellers <csellers@tresys.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      b94c7e67
    • C
      SELinux: ensure keys constant in hashtab_search · bb242497
      Chad Sellers 提交于
      Makes the key argument passed into hashtab_search and all the functions
      it calls constant. These functions include hash table function pointers
      hash_value and keycmp. The only implementations of these currently
      are symhash and symcmp, which do not modify the key. The key parameter
      should never be changed by any of these, so it should be const. This
      is necessary to allow calling these functions with keys found in kernel
      object class and permission definitions.
      Signed-off-by: NChad Sellers <csellers@tresys.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      bb242497
    • C
      SELinux: remove current object class and permission validation mechanism · 5a64d443
      Chad Sellers 提交于
      Removes the current SELinux object class and permission validation code,
      as the current code makes it impossible to change or remove object classes
      and permissions on a running system. Additionally, the current code does
      not actually validate that the classes and permissions are correct, but
      instead merely validates that they do not change between policy reloads.
      Signed-off-by: NChad Sellers <csellers@tresys.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      5a64d443
  10. 31 10月, 2006 1 次提交
    • P
      [NetLabel]: protect the CIPSOv4 socket option from setsockopt() · f8687afe
      Paul Moore 提交于
      This patch makes two changes to protect applications from either removing or
      tampering with the CIPSOv4 IP option on a socket.  The first is the requirement
      that applications have the CAP_NET_RAW capability to set an IPOPT_CIPSO option
      on a socket; this prevents untrusted applications from setting their own
      CIPSOv4 security attributes on the packets they send.  The second change is to
      SELinux and it prevents applications from setting any IPv4 options when there
      is an IPOPT_CIPSO option already present on the socket; this prevents
      applications from removing CIPSOv4 security attributes from the packets they
      send.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8687afe
  11. 16 10月, 2006 1 次提交
  12. 12 10月, 2006 3 次提交
  13. 26 9月, 2006 5 次提交
  14. 23 9月, 2006 7 次提交
  15. 01 8月, 2006 2 次提交
  16. 01 7月, 2006 2 次提交
  17. 20 6月, 2006 1 次提交
  18. 16 5月, 2006 1 次提交