evm: building without EVM enabled fixes
authorMimi Zohar <zohar@linux.vnet.ibm.com>
Thu, 11 Aug 2011 04:22:51 +0000 (00:22 -0400)
committerJames Morris <jmorris@namei.org>
Thu, 11 Aug 2011 07:42:07 +0000 (17:42 +1000)
- Missing 'inline' on evm_inode_setattr() definition.
Introduced by commit 817b54aa45db ("evm: add evm_inode_setattr to prevent
updating an invalid security.evm").

- Missing security_old_inode_init_security() stub function definition.
Caused by commit 9d8f13ba3f48 ("security: new security_inode_init_security
API adds function callback").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
include/linux/evm.h
include/linux/security.h

index db5556dcdd27eb1b13faa7664263a789007ccc49..62deb6557d37f4beb5052933b0c48f65f413809d 100644 (file)
@@ -45,7 +45,7 @@ static inline enum integrity_status evm_verifyxattr(struct dentry *dentry,
 }
 #endif
 
-static int evm_inode_setattr(struct dentry *dentry, struct iattr *attr)
+static inline int evm_inode_setattr(struct dentry *dentry, struct iattr *attr)
 {
        return 0;
 }
index 1c528b19a3291326105c217f2cbeb3dacabc8ac4..f399cf10e2a80de51dd32cc520af7a2859f4c91e 100644 (file)
@@ -2048,6 +2048,13 @@ static inline int security_inode_init_security(struct inode *inode,
        return -EOPNOTSUPP;
 }
 
+int security_old_inode_init_security(struct inode *inode, struct inode *dir,
+                                    const struct qstr *qstr, char **name,
+                                    void **value, size_t *len)
+{
+       return -EOPNOTSUPP;
+}
+
 static inline int security_inode_create(struct inode *dir,
                                         struct dentry *dentry,
                                         int mode)