2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-05 00:35:13 +00:00
Files
apparmor/kernel-patches/2.6.24/fix-name-errorpath.diff
John Johansen ad6613c960 Add patch series for 2.6.24 kernel, remove old for-mainline series
Patch series refreshed against 2.6.24 +
- fix-rcu-deref.diff: change way rcu cast is done
- fix-name-errorpath.diff: fix bug in failed pathname reporting
- fix-net.diff: fix bug in network mediation
- apparmor-fix-sysctl-refcount.diff - fix ref count bug in sysctl mediation
- apparmor-bootdisable.diff - allow apparmor to be disabled at boot
- apparmor-builtin-only.diff - apparmor as a builtin only
- split_init.diff - split apparmor initialization into early & apparmorfs
2008-02-08 06:11:09 +00:00

23 lines
637 B
Diff

fix bug where the error code and mask are not being set correctly
when pathname lookup fails.
---
security/apparmor/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/security/apparmor/main.c
+++ b/security/apparmor/main.c
@@ -191,8 +191,10 @@ static int aa_perm_dentry(struct aa_prof
*/
if (PTR_ERR(sa->name) == -ENOENT && (check & AA_CHECK_FD))
sa->denied_mask = 0;
- else
- sa->denied_mask = PTR_ERR(sa->name);
+ else {
+ sa->denied_mask = sa->requested_mask;
+ sa->error_code = PTR_ERR(sa->name);
+ }
sa->name = NULL;
} else
sa->denied_mask = aa_file_denied(profile, sa->name,