diff options
Diffstat (limited to 'security')
| -rw-r--r-- | security/integrity/ima/ima_fs.c | 10 | ||||
| -rw-r--r-- | security/keys/keyctl.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c index 8e9777b76405..0c72c9c38956 100644 --- a/security/integrity/ima/ima_fs.c +++ b/security/integrity/ima/ima_fs.c | |||
| @@ -43,7 +43,7 @@ static ssize_t ima_show_htable_violations(struct file *filp, | |||
| 43 | return ima_show_htable_value(buf, count, ppos, &ima_htable.violations); | 43 | return ima_show_htable_value(buf, count, ppos, &ima_htable.violations); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | static struct file_operations ima_htable_violations_ops = { | 46 | static const struct file_operations ima_htable_violations_ops = { |
| 47 | .read = ima_show_htable_violations | 47 | .read = ima_show_htable_violations |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| @@ -55,7 +55,7 @@ static ssize_t ima_show_measurements_count(struct file *filp, | |||
| 55 | 55 | ||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | static struct file_operations ima_measurements_count_ops = { | 58 | static const struct file_operations ima_measurements_count_ops = { |
| 59 | .read = ima_show_measurements_count | 59 | .read = ima_show_measurements_count |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| @@ -158,7 +158,7 @@ static int ima_measurements_open(struct inode *inode, struct file *file) | |||
| 158 | return seq_open(file, &ima_measurments_seqops); | 158 | return seq_open(file, &ima_measurments_seqops); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | static struct file_operations ima_measurements_ops = { | 161 | static const struct file_operations ima_measurements_ops = { |
| 162 | .open = ima_measurements_open, | 162 | .open = ima_measurements_open, |
| 163 | .read = seq_read, | 163 | .read = seq_read, |
| 164 | .llseek = seq_lseek, | 164 | .llseek = seq_lseek, |
| @@ -233,7 +233,7 @@ static int ima_ascii_measurements_open(struct inode *inode, struct file *file) | |||
| 233 | return seq_open(file, &ima_ascii_measurements_seqops); | 233 | return seq_open(file, &ima_ascii_measurements_seqops); |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | static struct file_operations ima_ascii_measurements_ops = { | 236 | static const struct file_operations ima_ascii_measurements_ops = { |
| 237 | .open = ima_ascii_measurements_open, | 237 | .open = ima_ascii_measurements_open, |
| 238 | .read = seq_read, | 238 | .read = seq_read, |
| 239 | .llseek = seq_lseek, | 239 | .llseek = seq_lseek, |
| @@ -313,7 +313,7 @@ static int ima_release_policy(struct inode *inode, struct file *file) | |||
| 313 | return 0; | 313 | return 0; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | static struct file_operations ima_measure_policy_ops = { | 316 | static const struct file_operations ima_measure_policy_ops = { |
| 317 | .open = ima_open_policy, | 317 | .open = ima_open_policy, |
| 318 | .write = ima_write_policy, | 318 | .write = ima_write_policy, |
| 319 | .release = ima_release_policy | 319 | .release = ima_release_policy |
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 2fb28efc5326..06ec722897be 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c | |||
| @@ -873,7 +873,7 @@ static long get_instantiation_keyring(key_serial_t ringid, | |||
| 873 | /* otherwise specify the destination keyring recorded in the | 873 | /* otherwise specify the destination keyring recorded in the |
| 874 | * authorisation key (any KEY_SPEC_*_KEYRING) */ | 874 | * authorisation key (any KEY_SPEC_*_KEYRING) */ |
| 875 | if (ringid >= KEY_SPEC_REQUESTOR_KEYRING) { | 875 | if (ringid >= KEY_SPEC_REQUESTOR_KEYRING) { |
| 876 | *_dest_keyring = rka->dest_keyring; | 876 | *_dest_keyring = key_get(rka->dest_keyring); |
| 877 | return 0; | 877 | return 0; |
| 878 | } | 878 | } |
| 879 | 879 | ||
