From: Davi Arnaut Date: Thu, 23 Mar 2006 10:59:25 +0000 (-0800) Subject: [PATCH] Bug fixes and cleanup for the BSD Secure Levels LSM X-Git-Tag: v2.6.17-rc1~1111 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bb08da4773f584a7b4a838b6b770d7d18033af7;p=pandora-kernel.git [PATCH] Bug fixes and cleanup for the BSD Secure Levels LSM This patch address several issues in the current BSD Secure Levels code: o plaintext_to_sha1: Missing check for a NULL return from __get_free_page o passwd_write_file: A page is leaked if the password is wrong. o fix securityfs registration order o seclvl_init is a mess and can't properly tolerate failures, failure path is upside down (deldif and delf should be switched) Cleanups: o plaintext_to_sha1: Use buffers passed in o passwd_write_file: Use kmalloc() instead of get_zeroed_page() o passwd_write_file: hashedPassword comparison is just memcmp o s/ENOSYS/EINVAL/ o misc (akpm: after some discussion it appears that the BSD secure levels feature should be scheduled for removal. But for now, let's fix these problems up). Signed-off-by: Davi Arnaut Cc: Michael Halcrow Cc: Chris Wright Cc: Stephen Smalley Cc: James Morris Cc: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed