~ubuntu-branches/ubuntu/raring/apparmor/raring

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/rename-activate-unpack.diff

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-03-23 16:42:01 UTC
  • Revision ID: james.westby@ubuntu.com-20070323164201-jkax6f0oku087b7l
Tags: upstream-2.0.1+510.dfsg
ImportĀ upstreamĀ versionĀ 2.0.1+510.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: linux-2.6-apparmor/security/apparmor/module_interface.c
 
2
===================================================================
 
3
--- linux-2.6-apparmor.orig/security/apparmor/module_interface.c
 
4
+++ linux-2.6-apparmor/security/apparmor/module_interface.c
 
5
@@ -47,7 +47,7 @@ enum aa_code {
 
6
 
 
7
 /* aa_ext is the read of the buffer containing the serialized profile.  The
 
8
  * data is copied into a kernel buffer in apparmorfs and then handed off to
 
9
- * the activate routines.
 
10
+ * the unpack routines.
 
11
  */
 
12
 struct aa_ext {
 
13
        void *start;
 
14
@@ -197,12 +197,12 @@ fail:
 
15
 }
 
16
 
 
17
 /**
 
18
- * aa_activate_dfa - unpack a file rule dfa
 
19
+ * aa_unpack_dfa - unpack a file rule dfa
 
20
  * @e: serialized data extent information
 
21
  *
 
22
  * returns dfa or ERR_PTR
 
23
  */
 
24
-struct aa_dfa *aa_activate_dfa(struct aa_ext *e)
 
25
+struct aa_dfa *aa_unpack_dfa(struct aa_ext *e)
 
26
 {
 
27
        char *blob = NULL;
 
28
        size_t size, error = 0;
 
29
@@ -234,11 +234,11 @@ struct aa_dfa *aa_activate_dfa(struct aa
 
30
 }
 
31
 
 
32
 /**
 
33
- * aa_activate_profile - unpack a serialized profile
 
34
+ * aa_unpack_profile - unpack a serialized profile
 
35
  * @e: serialized data extent information
 
36
  * @error: error code returned if unpacking fails
 
37
  */
 
38
-static struct aa_profile *aa_activate_profile(struct aa_ext *e)
 
39
+static struct aa_profile *aa_unpack_profile(struct aa_ext *e)
 
40
 {
 
41
        struct aa_profile *profile = NULL;
 
42
 
 
43
@@ -270,7 +270,7 @@ static struct aa_profile *aa_activate_pr
 
44
                goto fail;
 
45
 
 
46
        /* get file rules */
 
47
-       profile->file_rules = aa_activate_dfa(e);
 
48
+       profile->file_rules = aa_unpack_dfa(e);
 
49
        if (IS_ERR(profile->file_rules)) {
 
50
                error = PTR_ERR(profile->file_rules);
 
51
                profile->file_rules = NULL;
 
52
@@ -281,7 +281,7 @@ static struct aa_profile *aa_activate_pr
 
53
        if (aa_is_nameX(e, AA_LIST, "hats")) {
 
54
                while (!aa_is_nameX(e, AA_LISTEND, NULL)) {
 
55
                        struct aa_profile *subprofile;
 
56
-                       subprofile = aa_activate_profile(e);
 
57
+                       subprofile = aa_unpack_profile(e);
 
58
                        if (IS_ERR(subprofile)) {
 
59
                                error = PTR_ERR(subprofile);
 
60
                                goto fail;
 
61
@@ -307,15 +307,15 @@ fail:
 
62
 }
 
63
 
 
64
 /**
 
65
- * aa_activate_profile_wrapper - unpack a serialized base profile
 
66
+ * aa_unpack_profile_wrapper - unpack a serialized base profile
 
67
  * @e: serialized data extent information
 
68
  *
 
69
  * check interface version unpack a profile and all its hats and patch
 
70
  * in any extra information that the profile needs.
 
71
  */
 
72
-static struct aa_profile *aa_activate_profile_wrapper(struct aa_ext *e)
 
73
+static struct aa_profile *aa_unpack_profile_wrapper(struct aa_ext *e)
 
74
 {
 
75
-       struct aa_profile *profile = aa_activate_profile(e);
 
76
+       struct aa_profile *profile = aa_unpack_profile(e);
 
77
        if (!IS_ERR(profile) &&
 
78
            (!list_empty(&profile->sub) || profile->flags.complain)) {
 
79
                int error;
 
80
@@ -367,7 +367,7 @@ ssize_t aa_file_prof_add(void *data, siz
 
81
        if (error)
 
82
                return error;
 
83
 
 
84
-       profile = aa_activate_profile_wrapper(&e);
 
85
+       profile = aa_unpack_profile_wrapper(&e);
 
86
        if (IS_ERR(profile))
 
87
                return PTR_ERR(profile);
 
88
 
 
89
@@ -449,7 +449,7 @@ ssize_t aa_file_prof_replace(void *udata
 
90
        if (error)
 
91
                return error;
 
92
 
 
93
-       new_profile = aa_activate_profile_wrapper(&e);
 
94
+       new_profile = aa_unpack_profile_wrapper(&e);
 
95
        if (IS_ERR(new_profile))
 
96
                return PTR_ERR(new_profile);
 
97