diff options
author | David Howells <dhowells@redhat.com> | 2010-02-26 02:56:16 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-02-26 04:54:23 +0100 |
commit | ef57471a73b67a7b65fd8708fd55c77cb7c619af (patch) | |
tree | 0cb8f8dea197999d79bf69d192719be69cd36244 /security/selinux/hooks.c | |
parent | TOMOYO: Protect find_task_by_vpid() with RCU. (diff) | |
download | linux-ef57471a73b67a7b65fd8708fd55c77cb7c619af.tar.xz linux-ef57471a73b67a7b65fd8708fd55c77cb7c619af.zip |
SELinux: Make selinux_kernel_create_files_as() shouldn't just always return 0
Make selinux_kernel_create_files_as() return an error when it gets one, rather
than unconditionally returning 0.
Without this, cachefiles doesn't return an error if the SELinux policy doesn't
let it create files with the label of the directory at the base of the cache.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index dc7660074b99..5feecb41009d 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3329,7 +3329,7 @@ static int selinux_kernel_create_files_as(struct cred *new, struct inode *inode) if (ret == 0) tsec->create_sid = isec->sid; - return 0; + return ret; } static int selinux_kernel_module_request(char *kmod_name) |