1. 29 4月, 2011 2 次提交
    • E
      flex_array: flex_array_prealloc takes a number of elements, not an end · 5d30b10b
      Eric Paris 提交于
      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: NSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Tested-by: NChris Richards <gizmo@giz-works.com>
      Acked-by: NDave Hansen <dave@linux.vnet.ibm.com>
      Cc: stable@kernel.org [2.6.38+]
      5d30b10b
    • E
      SELinux: pass last path component in may_create · cb1e922f
      Eric Paris 提交于
      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: NDominick Grift <domg472@gmail.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      cb1e922f
  2. 08 3月, 2011 8 次提交
  3. 07 3月, 2011 2 次提交
  4. 06 3月, 2011 2 次提交
  5. 05 3月, 2011 22 次提交
  6. 04 3月, 2011 4 次提交