]> Git Repo - linux.git/commit - security/selinux/hooks.c
VFS/Security: Rework inode_getsecurity and callers to return resulting buffer
authorDavid P. Quigley <[email protected]>
Tue, 5 Feb 2008 06:29:39 +0000 (22:29 -0800)
committerLinus Torvalds <[email protected]>
Tue, 5 Feb 2008 17:44:20 +0000 (09:44 -0800)
commit42492594043d621a7910ff5877c3eb9202870b45
tree9188d112c019a189606847dc1d90ccc63c1bacf2
parent3729145821e3088a0c3c4183037fde356204bf97
VFS/Security: Rework inode_getsecurity and callers to return resulting buffer

This patch modifies the interface to inode_getsecurity to have the function
return a buffer containing the security blob and its length via parameters
instead of relying on the calling function to give it an appropriately sized
buffer.

Security blobs obtained with this function should be freed using the
release_secctx LSM hook.  This alleviates the problem of the caller having to
guess a length and preallocate a buffer for this function allowing it to be
used elsewhere for Labeled NFS.

The patch also removed the unused err parameter.  The conversion is similar to
the one performed by Al Viro for the security_getprocattr hook.

Signed-off-by: David P. Quigley <[email protected]>
Cc: Stephen Smalley <[email protected]>
Cc: Chris Wright <[email protected]>
Acked-by: James Morris <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: Casey Schaufler <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/xattr.c
include/linux/security.h
include/linux/xattr.h
mm/shmem.c
security/dummy.c
security/security.c
security/selinux/hooks.c
This page took 0.052875 seconds and 4 git commands to generate.