From: James Morris Date: Sun, 28 Feb 2010 22:36:31 +0000 (+1100) Subject: Merge branch 'next' into for-linus X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~22934^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b4ccebdd37ff70d349321a198f416ba737a5e833;p=mirror_ubuntu-artful-kernel.git Merge branch 'next' into for-linus --- b4ccebdd37ff70d349321a198f416ba737a5e833 diff --cc security/tomoyo/tomoyo.c index 2aceebf5f354,c94e35c3c759..dedd97d0c163 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c @@@ -76,12 -84,17 +84,16 @@@ static int tomoyo_bprm_check_security(s * Execute permission is checked against pathname passed to do_execve() * using current domain. */ - if (!domain) - return tomoyo_find_next_domain(bprm); + if (!domain) { + const int idx = tomoyo_read_lock(); + const int err = tomoyo_find_next_domain(bprm); + tomoyo_read_unlock(idx); + return err; + } /* * Read permission is checked against interpreters using next domain. - * '1' is the result of open_to_namei_flags(O_RDONLY). */ - return tomoyo_check_open_permission(domain, &bprm->file->f_path, 1); + return tomoyo_check_open_permission(domain, &bprm->file->f_path, O_RDONLY); } static int tomoyo_path_truncate(struct path *path, loff_t length,