1. 28 6月, 2016 3 次提交
    • H
      netlabel: Implement CALIPSO config functions for SMACK. · 3f09354a
      Huw Davies 提交于
      SMACK uses similar functions to control CIPSO, these are
      the equivalent functions for CALIPSO and follow exactly
      the same semantics.
      
      int netlbl_cfg_calipso_add(struct calipso_doi *doi_def,
                                 struct netlbl_audit *audit_info)
          Adds a CALIPSO doi.
      
      void netlbl_cfg_calipso_del(u32 doi, struct netlbl_audit *audit_info)
          Removes a CALIPSO doi.
      
      int netlbl_cfg_calipso_map_add(u32 doi, const char *domain,
                                     const struct in6_addr *addr,
                                     const struct in6_addr *mask,
                                     struct netlbl_audit *audit_info)
          Creates a mapping between a domain and a CALIPSO doi.  If
          addr and mask are non-NULL this creates an address-selector
          type mapping.
      
      This also extends netlbl_cfg_map_del() to remove IPv6 address-selector
      mappings.
      Signed-off-by: NHuw Davies <huw@codeweavers.com>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      3f09354a
    • H
      netlabel: Add support for creating a CALIPSO protocol domain mapping. · dc7de73f
      Huw Davies 提交于
      This extends the NLBL_MGMT_C_ADD and NLBL_MGMT_C_ADDDEF commands
      to accept CALIPSO protocol DOIs.
      Signed-off-by: NHuw Davies <huw@codeweavers.com>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      dc7de73f
    • H
      netlabel: Add an address family to domain hash entries. · 8f18e675
      Huw Davies 提交于
      The reason is to allow different labelling protocols for
      different address families with the same domain.
      
      This requires the addition of an address family attribute
      in the netlink communication protocol.  It is used in several
      messages:
      
      NLBL_MGMT_C_ADD and NLBL_MGMT_C_ADDDEF take it as an optional
      attribute for the unlabelled protocol.  It may be one of AF_INET,
      AF_INET6 or AF_UNSPEC (to specify both address families).  If it
      is missing, it defaults to AF_UNSPEC.
      
      NLBL_MGMT_C_LISTALL and NLBL_MGMT_C_LISTDEF return it as part of
      the enumeration of each item.  Addtionally, it may be sent to
      LISTDEF to specify which address family to return.
      Signed-off-by: NHuw Davies <huw@codeweavers.com>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      8f18e675
  2. 07 12月, 2013 1 次提交
  3. 03 8月, 2013 1 次提交
    • P
      netlabel: use domain based selectors when address based selectors are not available · 6a8b7f0c
      Paul Moore 提交于
      NetLabel has the ability to selectively assign network security labels
      to outbound traffic based on either the LSM's "domain" (different for
      each LSM), the network destination, or a combination of both.  Depending
      on the type of traffic, local or forwarded, and the type of traffic
      selector, domain or address based, different hooks are used to label the
      traffic; the goal being minimal overhead.
      
      Unfortunately, there is a bug such that a system using NetLabel domain
      based traffic selectors does not correctly label outbound local traffic
      that is not assigned to a socket.  The issue is that in these cases
      the associated NetLabel hook only looks at the address based selectors
      and not the domain based selectors.  This patch corrects this by
      checking both the domain and address based selectors so that the correct
      labeling is applied, regardless of the configuration type.
      
      In order to acomplish this fix, this patch also simplifies some of the
      NetLabel domainhash structures to use a more common outbound traffic
      mapping type: struct netlbl_dommap_def.  This simplifies some of the code
      in this patch and paves the way for further simplifications in the
      future.
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a8b7f0c
  4. 12 12月, 2011 1 次提交
  5. 02 8月, 2011 2 次提交
  6. 01 1月, 2009 1 次提交
  7. 10 10月, 2008 2 次提交
    • P
      netlabel: Add network address selectors to the NetLabel/LSM domain mapping · 63c41688
      Paul Moore 提交于
      This patch extends the NetLabel traffic labeling capabilities to individual
      packets based not only on the LSM domain but the by the destination address
      as well.  The changes here only affect the core NetLabel infrastructre,
      changes to the NetLabel KAPI and individial protocol engines are also
      required but are split out into a different patch to ease review.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Reviewed-by: NJames Morris <jmorris@namei.org>
      63c41688
    • P
      netlabel: Replace protocol/NetLabel linking with refrerence counts · b1edeb10
      Paul Moore 提交于
      NetLabel has always had a list of backpointers in the CIPSO DOI definition
      structure which pointed to the NetLabel LSM domain mapping structures which
      referenced the CIPSO DOI struct.  The rationale for this was that when an
      administrator removed a CIPSO DOI from the system all of the associated
      NetLabel LSM domain mappings should be removed as well; a list of
      backpointers made this a simple operation.
      
      Unfortunately, while the backpointers did make the removal easier they were
      a bit of a mess from an implementation point of view which was making
      further development difficult.  Since the removal of a CIPSO DOI is a
      realtively rare event it seems to make sense to remove this backpointer
      list as the optimization was hurting us more then it was helping.  However,
      we still need to be able to track when a CIPSO DOI definition is being used
      so replace the backpointer list with a reference count.  In order to
      preserve the current functionality of removing the associated LSM domain
      mappings when a CIPSO DOI is removed we walk the LSM domain mapping table,
      removing the relevant entries.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Reviewed-by: NJames Morris <jmorris@namei.org>
      b1edeb10
  8. 06 2月, 2008 1 次提交
  9. 30 9月, 2006 1 次提交
  10. 29 9月, 2006 1 次提交
  11. 26 9月, 2006 1 次提交
  12. 23 9月, 2006 2 次提交