ima: fix bug in argument order
authorDmitry Kasatkin <dmitry.kasatkin@intel.com>
Thu, 27 Sep 2012 15:26:53 +0000 (18:26 +0300)
committerJames Morris <james.l.morris@oracle.com>
Fri, 5 Oct 2012 12:32:16 +0000 (22:32 +1000)
mask argument goes first, then func, like ima_must_measure
and ima_get_action. ima_inode_post_setattr() assumes that.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/integrity/ima/ima.h
security/integrity/ima/ima_appraise.c

index 8180adde10b72486644ba9eb1902c02b855a06c2..6ee8826662ccd7d31a4669ee34eed478cbe0deff 100644 (file)
@@ -143,7 +143,7 @@ void ima_delete_rules(void);
 #ifdef CONFIG_IMA_APPRAISE
 int ima_appraise_measurement(struct integrity_iint_cache *iint,
                             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);
 
 #else
@@ -154,8 +154,8 @@ static inline int ima_appraise_measurement(struct integrity_iint_cache *iint,
        return INTEGRITY_UNKNOWN;
 }
 
-static inline int ima_must_appraise(struct inode *inode,
-                                   enum ima_hooks func, int mask)
+static inline int ima_must_appraise(struct inode *inode, int mask,
+                                   enum ima_hooks func)
 {
        return 0;
 }
index 0aa43bde441cbffc035e2eaad39b65b3c8bdd954..bdc8ba1d1d27855527aa7a265cd6de07fee2d291 100644 (file)
@@ -34,7 +34,7 @@ __setup("ima_appraise=", default_appraise_setup);
  *
  * 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)
                return 0;