@@ -151,7 +151,7 @@ static int evm_find_protected_xattrs(struct dentry *dentry)
151
151
return count ;
152
152
}
153
153
154
- static int is_unsupported_fs (struct dentry * dentry )
154
+ static int is_unsupported_hmac_fs (struct dentry * dentry )
155
155
{
156
156
struct inode * inode = d_backing_inode (dentry );
157
157
@@ -196,7 +196,8 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry,
196
196
* On unsupported filesystems without EVM_INIT_X509 enabled, skip
197
197
* signature verification.
198
198
*/
199
- if (!(evm_initialized & EVM_INIT_X509 ) && is_unsupported_fs (dentry ))
199
+ if (!(evm_initialized & EVM_INIT_X509 ) &&
200
+ is_unsupported_hmac_fs (dentry ))
200
201
return INTEGRITY_UNKNOWN ;
201
202
202
203
/* if status is not PASS, try to check again - against -ENOMEM */
@@ -266,7 +267,7 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry,
266
267
} else if (!IS_RDONLY (inode ) &&
267
268
!(inode -> i_sb -> s_readonly_remount ) &&
268
269
!IS_IMMUTABLE (inode ) &&
269
- !is_unsupported_fs (dentry )) {
270
+ !is_unsupported_hmac_fs (dentry )) {
270
271
evm_update_evmxattr (dentry , xattr_name ,
271
272
xattr_value ,
272
273
xattr_value_len );
@@ -502,20 +503,20 @@ static int evm_protect_xattr(struct mnt_idmap *idmap,
502
503
if (strcmp (xattr_name , XATTR_NAME_EVM ) == 0 ) {
503
504
if (!capable (CAP_SYS_ADMIN ))
504
505
return - EPERM ;
505
- if (is_unsupported_fs (dentry ))
506
+ if (is_unsupported_hmac_fs (dentry ))
506
507
return - EPERM ;
507
508
} else if (!evm_protected_xattr (xattr_name )) {
508
509
if (!posix_xattr_acl (xattr_name ))
509
510
return 0 ;
510
- if (is_unsupported_fs (dentry ))
511
+ if (is_unsupported_hmac_fs (dentry ))
511
512
return 0 ;
512
513
513
514
evm_status = evm_verify_current_integrity (dentry );
514
515
if ((evm_status == INTEGRITY_PASS ) ||
515
516
(evm_status == INTEGRITY_NOXATTRS ))
516
517
return 0 ;
517
518
goto out ;
518
- } else if (is_unsupported_fs (dentry ))
519
+ } else if (is_unsupported_hmac_fs (dentry ))
519
520
return 0 ;
520
521
521
522
evm_status = evm_verify_current_integrity (dentry );
@@ -817,7 +818,7 @@ static void evm_inode_post_setxattr(struct dentry *dentry,
817
818
if (!(evm_initialized & EVM_INIT_HMAC ))
818
819
return ;
819
820
820
- if (is_unsupported_fs (dentry ))
821
+ if (is_unsupported_hmac_fs (dentry ))
821
822
return ;
822
823
823
824
evm_update_evmxattr (dentry , xattr_name , xattr_value , xattr_value_len );
@@ -916,7 +917,7 @@ static int evm_inode_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
916
917
if (evm_initialized & EVM_ALLOW_METADATA_WRITES )
917
918
return 0 ;
918
919
919
- if (is_unsupported_fs (dentry ))
920
+ if (is_unsupported_hmac_fs (dentry ))
920
921
return 0 ;
921
922
922
923
if (!(ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID )))
@@ -967,7 +968,7 @@ static void evm_inode_post_setattr(struct mnt_idmap *idmap,
967
968
if (!(evm_initialized & EVM_INIT_HMAC ))
968
969
return ;
969
970
970
- if (is_unsupported_fs (dentry ))
971
+ if (is_unsupported_hmac_fs (dentry ))
971
972
return ;
972
973
973
974
if (ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID ))
0 commit comments