Commit d26e1936 authored by Dmitry Kasatkin's avatar Dmitry Kasatkin Committed by James Morris

ima: fix bug in argument order

mask argument goes first, then func, like ima_must_measure
and ima_get_action. ima_inode_post_setattr() assumes that.
Signed-off-by: default avatarDmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
parent ecefbd94
...@@ -143,7 +143,7 @@ void ima_delete_rules(void); ...@@ -143,7 +143,7 @@ void ima_delete_rules(void);
#ifdef CONFIG_IMA_APPRAISE #ifdef CONFIG_IMA_APPRAISE
int ima_appraise_measurement(struct integrity_iint_cache *iint, int ima_appraise_measurement(struct integrity_iint_cache *iint,
struct file *file, const unsigned char *filename); struct file *file, const unsigned char *filename);
int ima_must_appraise(struct inode *inode, enum ima_hooks func, int mask); int ima_must_appraise(struct inode *inode, int mask, enum ima_hooks func);
void ima_update_xattr(struct integrity_iint_cache *iint, struct file *file); void ima_update_xattr(struct integrity_iint_cache *iint, struct file *file);
#else #else
...@@ -154,8 +154,8 @@ static inline int ima_appraise_measurement(struct integrity_iint_cache *iint, ...@@ -154,8 +154,8 @@ static inline int ima_appraise_measurement(struct integrity_iint_cache *iint,
return INTEGRITY_UNKNOWN; return INTEGRITY_UNKNOWN;
} }
static inline int ima_must_appraise(struct inode *inode, static inline int ima_must_appraise(struct inode *inode, int mask,
enum ima_hooks func, int mask) enum ima_hooks func)
{ {
return 0; return 0;
} }
......
...@@ -34,7 +34,7 @@ __setup("ima_appraise=", default_appraise_setup); ...@@ -34,7 +34,7 @@ __setup("ima_appraise=", default_appraise_setup);
* *
* Return 1 to appraise * Return 1 to appraise
*/ */
int ima_must_appraise(struct inode *inode, enum ima_hooks func, int mask) int ima_must_appraise(struct inode *inode, int mask, enum ima_hooks func)
{ {
if (!ima_appraise) if (!ima_appraise)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment