1. 20 8月, 2019 1 次提交
  2. 27 3月, 2019 11 次提交
  3. 25 3月, 2019 1 次提交
  4. 21 3月, 2019 2 次提交
    • O
      LSM: add new hook for kernfs node initialization · b230d5ab
      Ondrej Mosnacek 提交于
      This patch introduces a new security hook that is intended for
      initializing the security data for newly created kernfs nodes, which
      provide a way of storing a non-default security context, but need to
      operate independently from mounts (and therefore may not have an
      associated inode at the moment of creation).
      
      The main motivation is to allow kernfs nodes to inherit the context of
      the parent under SELinux, similar to the behavior of
      security_inode_init_security(). Other LSMs may implement their own logic
      for handling the creation of new nodes.
      
      This patch also adds helper functions to <linux/kernfs.h> for
      getting/setting security xattrs of a kernfs node so that LSMs hooks are
      able to do their job. Other important attributes should be accessible
      direcly in the kernfs_node fields (in case there is need for more, then
      new helpers should be added to kernfs.h along with the patch that needs
      them).
      Signed-off-by: NOndrej Mosnacek <omosnace@redhat.com>
      Acked-by: NCasey Schaufler <casey@schaufler-ca.com>
      [PM: more manual merge fixes]
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      b230d5ab
    • D
      vfs: syscall: Add move_mount(2) to move mounts around · 2db154b3
      David Howells 提交于
      Add a move_mount() system call that will move a mount from one place to
      another and, in the next commit, allow to attach an unattached mount tree.
      
      The new system call looks like the following:
      
      	int move_mount(int from_dfd, const char *from_path,
      		       int to_dfd, const char *to_path,
      		       unsigned int flags);
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      cc: linux-api@vger.kernel.org
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2db154b3
  5. 28 2月, 2019 2 次提交
    • A
      introduce cloning of fs_context · 0b52075e
      Al Viro 提交于
      new primitive: vfs_dup_fs_context().  Comes with fs_context
      method (->dup()) for copying the filesystem-specific parts
      of fs_context, along with LSM one (->fs_context_dup()) for
      doing the same to LSM parts.
      
      [needs better commit message, and change of Author:, anyway]
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0b52075e
    • D
      vfs: Add LSM hooks for the new mount API · da2441fd
      David Howells 提交于
      Add LSM hooks for use by the new mount API and filesystem context code.
      This includes:
      
       (1) Hooks to handle allocation, duplication and freeing of the security
           record attached to a filesystem context.
      
       (2) A hook to snoop source specifications.  There may be multiple of these
           if the filesystem supports it.  They will to be local files/devices if
           fs_context::source_is_dev is true and will be something else, possibly
           remote server specifications, if false.
      
       (3) A hook to snoop superblock configuration options in key[=val] form.
           If the LSM decides it wants to handle it, it can suppress the option
           being passed to the filesystem.  Note that 'val' may include commas
           and binary data with the fsopen patch.
      
       (4) A hook to perform validation and allocation after the configuration
           has been done but before the superblock is allocated and set up.
      
       (5) A hook to transfer the security from the context to a newly created
           superblock.
      
       (6) A hook to rule on whether a path point can be used as a mountpoint.
      
      These are intended to replace:
      
      	security_sb_copy_data
      	security_sb_kern_mount
      	security_sb_mount
      	security_sb_set_mnt_opts
      	security_sb_clone_mnt_opts
      	security_sb_parse_opts_str
      
      [AV -- some of the methods being replaced are already gone, some of the
      methods are not added for the lack of need]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      cc: linux-security-module@vger.kernel.org
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      da2441fd
  6. 01 2月, 2019 1 次提交
  7. 19 1月, 2019 1 次提交
  8. 11 1月, 2019 1 次提交
  9. 09 1月, 2019 14 次提交
  10. 22 12月, 2018 6 次提交