~apparmor-dev/apparmor/2_3

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/fix-named-transitions.diff

  • Committer: jrjohansen
  • Date: 2008-05-27 12:04:33 UTC
  • Revision ID: svn-v4:40609528-9d10-0410-9bd8-e926d5471da9:branches/2_3:1265
remove for-mainline dir from kernel patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
---
2
 
 security/apparmor/main.c             |    2 +-
3
 
 security/apparmor/module_interface.c |    1 +
4
 
 2 files changed, 2 insertions(+), 1 deletion(-)
5
 
 
6
 
--- a/security/apparmor/main.c
7
 
+++ b/security/apparmor/main.c
8
 
@@ -1119,7 +1119,7 @@ aa_x_to_profile(struct aa_profile *profi
9
 
        default:
10
 
                /* all other indexes are named transitions */
11
 
                index = AA_EXEC_INDEX(xmode);
12
 
-               if (index - 4 > profile->exec_table_size) {
13
 
+               if (index - 4 >= profile->exec_table_size) {
14
 
                        sa->info = "invalid named transition - exec failed";
15
 
                        sa->error_code = -EACCES;
16
 
                        new_profile = ERR_PTR(-EACCES);
17
 
--- a/security/apparmor/module_interface.c
18
 
+++ b/security/apparmor/module_interface.c
19
 
@@ -319,6 +319,7 @@ static int aa_unpack_exec_table(struct a
20
 
                        goto fail;
21
 
                if (!aa_is_nameX(e, AA_STRUCTEND, NULL))
22
 
                        goto fail;
23
 
+               profile->exec_table_size = size;
24
 
        }
25
 
        return 1;
26