diff options
Diffstat (limited to 'security/integrity')
| -rw-r--r-- | security/integrity/digsig.c | 2 | ||||
| -rw-r--r-- | security/integrity/iint.c | 3 | ||||
| -rw-r--r-- | security/integrity/integrity.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c index 5e3bd72b299a..36fb6b527829 100644 --- a/security/integrity/digsig.c +++ b/security/integrity/digsig.c | |||
| @@ -85,7 +85,7 @@ int __init integrity_init_keyring(const unsigned int id) | |||
| 85 | return err; | 85 | return err; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | int __init integrity_load_x509(const unsigned int id, char *path) | 88 | int __init integrity_load_x509(const unsigned int id, const char *path) |
| 89 | { | 89 | { |
| 90 | key_ref_t key; | 90 | key_ref_t key; |
| 91 | char *data; | 91 | char *data; |
diff --git a/security/integrity/iint.c b/security/integrity/iint.c index dbb6d141c3db..3d2f5b45c8cb 100644 --- a/security/integrity/iint.c +++ b/security/integrity/iint.c | |||
| @@ -213,6 +213,9 @@ int __init integrity_read_file(const char *path, char **data) | |||
| 213 | char *buf; | 213 | char *buf; |
| 214 | int rc = -EINVAL; | 214 | int rc = -EINVAL; |
| 215 | 215 | ||
| 216 | if (!path || !*path) | ||
| 217 | return -EINVAL; | ||
| 218 | |||
| 216 | file = filp_open(path, O_RDONLY, 0); | 219 | file = filp_open(path, O_RDONLY, 0); |
| 217 | if (IS_ERR(file)) { | 220 | if (IS_ERR(file)) { |
| 218 | rc = PTR_ERR(file); | 221 | rc = PTR_ERR(file); |
diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h index 0fc9519fefa9..9c6168709d3b 100644 --- a/security/integrity/integrity.h +++ b/security/integrity/integrity.h | |||
| @@ -135,7 +135,7 @@ int integrity_digsig_verify(const unsigned int id, const char *sig, int siglen, | |||
| 135 | const char *digest, int digestlen); | 135 | const char *digest, int digestlen); |
| 136 | 136 | ||
| 137 | int __init integrity_init_keyring(const unsigned int id); | 137 | int __init integrity_init_keyring(const unsigned int id); |
| 138 | int __init integrity_load_x509(const unsigned int id, char *path); | 138 | int __init integrity_load_x509(const unsigned int id, const char *path); |
| 139 | #else | 139 | #else |
| 140 | 140 | ||
| 141 | static inline int integrity_digsig_verify(const unsigned int id, | 141 | static inline int integrity_digsig_verify(const unsigned int id, |
