diff options
| author | James Morris <james.l.morris@oracle.com> | 2014-07-26 10:40:28 +1000 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2014-07-26 10:40:28 +1000 |
| commit | f6fd5c84b9eb93ee6fbf028da87a32aeeecc5ee4 (patch) | |
| tree | 1784d073fac0cb87b9811c43bde0dda3ba16d6ba /security/integrity/ima/ima_main.c | |
| parent | ed3c4f8f862b9e79bafec3b85cde98c95807821e (diff) | |
| parent | 5a9196d715607f76d6b7d96a0970d6065335e62b (diff) | |
Merge tag 'fw-restrict-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next
Diffstat (limited to 'security/integrity/ima/ima_main.c')
| -rw-r--r-- | security/integrity/ima/ima_main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 0d696431209c..2917f980bf30 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -319,6 +319,17 @@ int ima_module_check(struct file *file) return process_measurement(file, NULL, MAY_EXEC, MODULE_CHECK); } +int ima_fw_from_file(struct file *file, char *buf, size_t size) +{ + if (!file) { + if ((ima_appraise & IMA_APPRAISE_FIRMWARE) && + (ima_appraise & IMA_APPRAISE_ENFORCE)) + return -EACCES; /* INTEGRITY_UNKNOWN */ + return 0; + } + return process_measurement(file, NULL, MAY_EXEC, FIRMWARE_CHECK); +} + static int __init init_ima(void) { int error; |
