diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /security/integrity/ima/ima_api.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'security/integrity/ima/ima_api.c')
-rw-r--r-- | security/integrity/ima/ima_api.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c index 52015d098fdf..da36d2c085a4 100644 --- a/security/integrity/ima/ima_api.c +++ b/security/integrity/ima/ima_api.c | |||
@@ -105,20 +105,13 @@ err_out: | |||
105 | * mask: contains the permission mask | 105 | * mask: contains the permission mask |
106 | * fsmagic: hex value | 106 | * fsmagic: hex value |
107 | * | 107 | * |
108 | * Must be called with iint->mutex held. | 108 | * Return 0 to measure. For matching a DONT_MEASURE policy, no policy, |
109 | * | 109 | * or other error, return an error code. |
110 | * Return 0 to measure. Return 1 if already measured. | ||
111 | * For matching a DONT_MEASURE policy, no policy, or other | ||
112 | * error, return an error code. | ||
113 | */ | 110 | */ |
114 | int ima_must_measure(struct ima_iint_cache *iint, struct inode *inode, | 111 | int ima_must_measure(struct inode *inode, int mask, int function) |
115 | int mask, int function) | ||
116 | { | 112 | { |
117 | int must_measure; | 113 | int must_measure; |
118 | 114 | ||
119 | if (iint->flags & IMA_MEASURED) | ||
120 | return 1; | ||
121 | |||
122 | must_measure = ima_match_policy(inode, function, mask); | 115 | must_measure = ima_match_policy(inode, function, mask); |
123 | return must_measure ? 0 : -EACCES; | 116 | return must_measure ? 0 : -EACCES; |
124 | } | 117 | } |