1. 28 Apr, 2011 2 commits
    • Eric Paris's avatar
      flex_array: flex_array_prealloc takes a number of elements, not an end · 5d30b10b
      Eric Paris authored
      Change flex_array_prealloc to take the number of elements for which space
      should be allocated instead of the last (inclusive) element. Users
      and documentation are updated accordingly.  flex_arrays got introduced before
      they had users.  When folks started using it, they ended up needing a
      different API than was coded up originally.  This swaps over to the API that
      folks apparently need.
      Based-on-patch-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Tested-by: default avatarChris Richards <gizmo@giz-works.com>
      Acked-by: default avatarDave Hansen <dave@linux.vnet.ibm.com>
      Cc: stable@kernel.org [2.6.38+]
      5d30b10b
    • Eric Paris's avatar
      SELinux: pass last path component in may_create · cb1e922f
      Eric Paris authored
      New inodes are created in a two stage process.  We first will compute the
      label on a new inode in security_inode_create() and check if the
      operation is allowed.  We will then actually re-compute that same label and
      apply it in security_inode_init_security().  The change to do new label
      calculations based in part on the last component of the path name only
      passed the path component information all the way down the
      security_inode_init_security hook.  Down the security_inode_create hook the
      path information did not make it past may_create.  Thus the two calculations
      came up differently and the permissions check might not actually be against
      the label that is created.  Pass and use the same information in both places
      to harmonize the calculations and checks.
      Reported-by: default avatarDominick Grift <domg472@gmail.com>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      cb1e922f
  2. 08 Mar, 2011 5 commits
  3. 07 Mar, 2011 3 commits
  4. 06 Mar, 2011 3 commits
  5. 05 Mar, 2011 17 commits
  6. 04 Mar, 2011 10 commits