From: David P. Quigley Date: Tue, 5 Feb 2008 06:29:39 +0000 (-0800) Subject: VFS/Security: Rework inode_getsecurity and callers to return resulting buffer X-Git-Tag: v2.6.25-rc1~917 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42492594043d621a7910ff5877c3eb9202870b45;p=pandora-kernel.git 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 Cc: Stephen Smalley Cc: Chris Wright Acked-by: James Morris Acked-by: Serge Hallyn Cc: Casey Schaufler Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed