diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 18:26:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:56 -0400 |
commit | c6f493d631c4d40cea5c36055f9148f547b200af (patch) | |
tree | 233b04dca85cd796dffe1284a55b1fba24d0d59a /security/integrity/evm/evm_main.c | |
parent | c5ef60352893b139147b7c033354e8e028e7f52a (diff) |
VFS: security/: d_backing_inode() annotations
most of the ->d_inode uses there refer to the same inode IO would
go to, i.e. d_backing_inode()
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/integrity/evm/evm_main.c')
-rw-r--r-- | security/integrity/evm/evm_main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index f589c9a05da2..10f994307a04 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c | |||
@@ -72,7 +72,7 @@ static void __init evm_init_config(void) | |||
72 | 72 | ||
73 | static int evm_find_protected_xattrs(struct dentry *dentry) | 73 | static int evm_find_protected_xattrs(struct dentry *dentry) |
74 | { | 74 | { |
75 | struct inode *inode = dentry->d_inode; | 75 | struct inode *inode = d_backing_inode(dentry); |
76 | char **xattr; | 76 | char **xattr; |
77 | int error; | 77 | int error; |
78 | int count = 0; | 78 | int count = 0; |
@@ -165,8 +165,8 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry, | |||
165 | /* Replace RSA with HMAC if not mounted readonly and | 165 | /* Replace RSA with HMAC if not mounted readonly and |
166 | * not immutable | 166 | * not immutable |
167 | */ | 167 | */ |
168 | if (!IS_RDONLY(dentry->d_inode) && | 168 | if (!IS_RDONLY(d_backing_inode(dentry)) && |
169 | !IS_IMMUTABLE(dentry->d_inode)) | 169 | !IS_IMMUTABLE(d_backing_inode(dentry))) |
170 | evm_update_evmxattr(dentry, xattr_name, | 170 | evm_update_evmxattr(dentry, xattr_name, |
171 | xattr_value, | 171 | xattr_value, |
172 | xattr_value_len); | 172 | xattr_value_len); |
@@ -235,7 +235,7 @@ enum integrity_status evm_verifyxattr(struct dentry *dentry, | |||
235 | return INTEGRITY_UNKNOWN; | 235 | return INTEGRITY_UNKNOWN; |
236 | 236 | ||
237 | if (!iint) { | 237 | if (!iint) { |
238 | iint = integrity_iint_find(dentry->d_inode); | 238 | iint = integrity_iint_find(d_backing_inode(dentry)); |
239 | if (!iint) | 239 | if (!iint) |
240 | return INTEGRITY_UNKNOWN; | 240 | return INTEGRITY_UNKNOWN; |
241 | } | 241 | } |
@@ -253,7 +253,7 @@ EXPORT_SYMBOL_GPL(evm_verifyxattr); | |||
253 | */ | 253 | */ |
254 | static enum integrity_status evm_verify_current_integrity(struct dentry *dentry) | 254 | static enum integrity_status evm_verify_current_integrity(struct dentry *dentry) |
255 | { | 255 | { |
256 | struct inode *inode = dentry->d_inode; | 256 | struct inode *inode = d_backing_inode(dentry); |
257 | 257 | ||
258 | if (!evm_initialized || !S_ISREG(inode->i_mode) || evm_fixmode) | 258 | if (!evm_initialized || !S_ISREG(inode->i_mode) || evm_fixmode) |
259 | return 0; | 259 | return 0; |
@@ -293,13 +293,13 @@ static int evm_protect_xattr(struct dentry *dentry, const char *xattr_name, | |||
293 | if (evm_status == INTEGRITY_NOXATTRS) { | 293 | if (evm_status == INTEGRITY_NOXATTRS) { |
294 | struct integrity_iint_cache *iint; | 294 | struct integrity_iint_cache *iint; |
295 | 295 | ||
296 | iint = integrity_iint_find(dentry->d_inode); | 296 | iint = integrity_iint_find(d_backing_inode(dentry)); |
297 | if (iint && (iint->flags & IMA_NEW_FILE)) | 297 | if (iint && (iint->flags & IMA_NEW_FILE)) |
298 | return 0; | 298 | return 0; |
299 | } | 299 | } |
300 | out: | 300 | out: |
301 | if (evm_status != INTEGRITY_PASS) | 301 | if (evm_status != INTEGRITY_PASS) |
302 | integrity_audit_msg(AUDIT_INTEGRITY_METADATA, dentry->d_inode, | 302 | integrity_audit_msg(AUDIT_INTEGRITY_METADATA, d_backing_inode(dentry), |
303 | dentry->d_name.name, "appraise_metadata", | 303 | dentry->d_name.name, "appraise_metadata", |
304 | integrity_status_msg[evm_status], | 304 | integrity_status_msg[evm_status], |
305 | -EPERM, 0); | 305 | -EPERM, 0); |
@@ -379,7 +379,7 @@ void evm_inode_post_setxattr(struct dentry *dentry, const char *xattr_name, | |||
379 | */ | 379 | */ |
380 | void evm_inode_post_removexattr(struct dentry *dentry, const char *xattr_name) | 380 | void evm_inode_post_removexattr(struct dentry *dentry, const char *xattr_name) |
381 | { | 381 | { |
382 | struct inode *inode = dentry->d_inode; | 382 | struct inode *inode = d_backing_inode(dentry); |
383 | 383 | ||
384 | if (!evm_initialized || !evm_protected_xattr(xattr_name)) | 384 | if (!evm_initialized || !evm_protected_xattr(xattr_name)) |
385 | return; | 385 | return; |
@@ -404,7 +404,7 @@ int evm_inode_setattr(struct dentry *dentry, struct iattr *attr) | |||
404 | if ((evm_status == INTEGRITY_PASS) || | 404 | if ((evm_status == INTEGRITY_PASS) || |
405 | (evm_status == INTEGRITY_NOXATTRS)) | 405 | (evm_status == INTEGRITY_NOXATTRS)) |
406 | return 0; | 406 | return 0; |
407 | integrity_audit_msg(AUDIT_INTEGRITY_METADATA, dentry->d_inode, | 407 | integrity_audit_msg(AUDIT_INTEGRITY_METADATA, d_backing_inode(dentry), |
408 | dentry->d_name.name, "appraise_metadata", | 408 | dentry->d_name.name, "appraise_metadata", |
409 | integrity_status_msg[evm_status], -EPERM, 0); | 409 | integrity_status_msg[evm_status], -EPERM, 0); |
410 | return -EPERM; | 410 | return -EPERM; |