aboutsummaryrefslogtreecommitdiffstats
path: root/security/integrity
diff options
context:
space:
mode:
Diffstat (limited to 'security/integrity')
-rw-r--r--security/integrity/digsig.c2
-rw-r--r--security/integrity/evm/evm_posix_acl.c3
-rw-r--r--security/integrity/ima/ima_appraise.c6
-rw-r--r--security/integrity/ima/ima_fs.c3
-rw-r--r--security/integrity/ima/ima_main.c10
-rw-r--r--security/integrity/integrity.h2
6 files changed, 13 insertions, 13 deletions
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
index 0b759e17a131..198e60903685 100644
--- a/security/integrity/digsig.c
+++ b/security/integrity/digsig.c
@@ -28,7 +28,7 @@ static const char *keyring_name[INTEGRITY_KEYRING_MAX] = {
28}; 28};
29 29
30int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen, 30int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen,
31 const char *digest, int digestlen) 31 const char *digest, int digestlen)
32{ 32{
33 if (id >= INTEGRITY_KEYRING_MAX) 33 if (id >= INTEGRITY_KEYRING_MAX)
34 return -EINVAL; 34 return -EINVAL;
diff --git a/security/integrity/evm/evm_posix_acl.c b/security/integrity/evm/evm_posix_acl.c
index b1753e98bf9a..46408b9e62e8 100644
--- a/security/integrity/evm/evm_posix_acl.c
+++ b/security/integrity/evm/evm_posix_acl.c
@@ -11,8 +11,9 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/xattr.h> 13#include <linux/xattr.h>
14#include <linux/evm.h>
14 15
15int posix_xattr_acl(char *xattr) 16int posix_xattr_acl(const char *xattr)
16{ 17{
17 int xattr_len = strlen(xattr); 18 int xattr_len = strlen(xattr);
18 19
diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
index 2d4becab8918..e3230d6a8d96 100644
--- a/security/integrity/ima/ima_appraise.c
+++ b/security/integrity/ima/ima_appraise.c
@@ -55,7 +55,7 @@ static int ima_fix_xattr(struct dentry *dentry,
55enum integrity_status ima_get_cache_status(struct integrity_iint_cache *iint, 55enum integrity_status ima_get_cache_status(struct integrity_iint_cache *iint,
56 int func) 56 int func)
57{ 57{
58 switch(func) { 58 switch (func) {
59 case MMAP_CHECK: 59 case MMAP_CHECK:
60 return iint->ima_mmap_status; 60 return iint->ima_mmap_status;
61 case BPRM_CHECK: 61 case BPRM_CHECK:
@@ -71,7 +71,7 @@ enum integrity_status ima_get_cache_status(struct integrity_iint_cache *iint,
71static void ima_set_cache_status(struct integrity_iint_cache *iint, 71static void ima_set_cache_status(struct integrity_iint_cache *iint,
72 int func, enum integrity_status status) 72 int func, enum integrity_status status)
73{ 73{
74 switch(func) { 74 switch (func) {
75 case MMAP_CHECK: 75 case MMAP_CHECK:
76 iint->ima_mmap_status = status; 76 iint->ima_mmap_status = status;
77 break; 77 break;
@@ -90,7 +90,7 @@ static void ima_set_cache_status(struct integrity_iint_cache *iint,
90 90
91static void ima_cache_flags(struct integrity_iint_cache *iint, int func) 91static void ima_cache_flags(struct integrity_iint_cache *iint, int func)
92{ 92{
93 switch(func) { 93 switch (func) {
94 case MMAP_CHECK: 94 case MMAP_CHECK:
95 iint->flags |= (IMA_MMAP_APPRAISED | IMA_APPRAISED); 95 iint->flags |= (IMA_MMAP_APPRAISED | IMA_APPRAISED);
96 break; 96 break;
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
index 38477c9c3415..5f0fd113433a 100644
--- a/security/integrity/ima/ima_fs.c
+++ b/security/integrity/ima/ima_fs.c
@@ -88,8 +88,7 @@ static void *ima_measurements_next(struct seq_file *m, void *v, loff_t *pos)
88 * against concurrent list-extension 88 * against concurrent list-extension
89 */ 89 */
90 rcu_read_lock(); 90 rcu_read_lock();
91 qe = list_entry_rcu(qe->later.next, 91 qe = list_entry_rcu(qe->later.next, struct ima_queue_entry, later);
92 struct ima_queue_entry, later);
93 rcu_read_unlock(); 92 rcu_read_unlock();
94 (*pos)++; 93 (*pos)++;
95 94
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index e9508d5bbfcf..0f359df6344c 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -244,9 +244,9 @@ int ima_file_mmap(struct file *file, unsigned long prot)
244int ima_bprm_check(struct linux_binprm *bprm) 244int ima_bprm_check(struct linux_binprm *bprm)
245{ 245{
246 return process_measurement(bprm->file, 246 return process_measurement(bprm->file,
247 (strcmp(bprm->filename, bprm->interp) == 0) ? 247 (strcmp(bprm->filename, bprm->interp) == 0) ?
248 bprm->filename : bprm->interp, 248 bprm->filename : bprm->interp,
249 MAY_EXEC, BPRM_CHECK); 249 MAY_EXEC, BPRM_CHECK);
250} 250}
251 251
252/** 252/**
@@ -263,8 +263,8 @@ int ima_file_check(struct file *file, int mask)
263{ 263{
264 ima_rdwr_violation_check(file); 264 ima_rdwr_violation_check(file);
265 return process_measurement(file, NULL, 265 return process_measurement(file, NULL,
266 mask & (MAY_READ | MAY_WRITE | MAY_EXEC), 266 mask & (MAY_READ | MAY_WRITE | MAY_EXEC),
267 FILE_CHECK); 267 FILE_CHECK);
268} 268}
269EXPORT_SYMBOL_GPL(ima_file_check); 269EXPORT_SYMBOL_GPL(ima_file_check);
270 270
diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h
index c42fb7a70dee..f86731649f54 100644
--- a/security/integrity/integrity.h
+++ b/security/integrity/integrity.h
@@ -89,7 +89,7 @@ struct integrity_iint_cache *integrity_iint_find(struct inode *inode);
89#ifdef CONFIG_INTEGRITY_SIGNATURE 89#ifdef CONFIG_INTEGRITY_SIGNATURE
90 90
91int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen, 91int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen,
92 const char *digest, int digestlen); 92 const char *digest, int digestlen);
93 93
94#else 94#else
95 95