1. 12 Jul, 2016 24 commits
  2. 09 Jul, 2016 1 commit
  3. 08 Jul, 2016 1 commit
  4. 07 Jul, 2016 3 commits
  5. 30 Jun, 2016 8 commits
  6. 27 Jun, 2016 3 commits
    • Huw Davies's avatar
      netlabel: Implement CALIPSO config functions for SMACK. · 3f09354a
      Huw Davies authored
      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: default avatarHuw Davies <huw@codeweavers.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      3f09354a
    • Huw Davies's avatar
      calipso: Add a label cache. · 4fee5242
      Huw Davies authored
      This works in exactly the same way as the CIPSO label cache.
      The idea is to allow the lsm to cache the result of a secattr
      lookup so that it doesn't need to perform the lookup for
      every skbuff.
      
      It introduces two sysctl controls:
       calipso_cache_enable - enables/disables the cache.
       calipso_cache_bucket_size - sets the size of a cache bucket.
      Signed-off-by: default avatarHuw Davies <huw@codeweavers.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      4fee5242
    • Huw Davies's avatar
      calipso: Add validation of CALIPSO option. · 2e532b70
      Huw Davies authored
      Lengths, checksum and the DOI are checked.  Checking of the
      level and categories are left for the socket layer.
      
      CRC validation is performed in the calipso module to avoid
      unconditionally linking crc_ccitt() into ipv6.
      Signed-off-by: default avatarHuw Davies <huw@codeweavers.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      2e532b70