aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/inode.c2
-rw-r--r--include/linux/security.h11
-rw-r--r--security/capability.c5
-rw-r--r--security/security.c7
4 files changed, 0 insertions, 25 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 407bf392e20a..258ec22bb298 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1205,8 +1205,6 @@ void generic_delete_inode(struct inode *inode)
1205 inodes_stat.nr_inodes--; 1205 inodes_stat.nr_inodes--;
1206 spin_unlock(&inode_lock); 1206 spin_unlock(&inode_lock);
1207 1207
1208 security_inode_delete(inode);
1209
1210 if (op->delete_inode) { 1208 if (op->delete_inode) {
1211 void (*delete)(struct inode *) = op->delete_inode; 1209 void (*delete)(struct inode *) = op->delete_inode;
1212 /* Filesystems implementing their own 1210 /* Filesystems implementing their own
diff --git a/include/linux/security.h b/include/linux/security.h
index 4de5bbb39052..ef6edc759891 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -478,12 +478,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
478 * @mnt is the vfsmount where the dentry was looked up 478 * @mnt is the vfsmount where the dentry was looked up
479 * @dentry contains the dentry structure for the file. 479 * @dentry contains the dentry structure for the file.
480 * Return 0 if permission is granted. 480 * Return 0 if permission is granted.
481 * @inode_delete:
482 * @inode contains the inode structure for deleted inode.
483 * This hook is called when a deleted inode is released (i.e. an inode
484 * with no hard links has its use count drop to zero). A security module
485 * can use this hook to release any persistent label associated with the
486 * inode.
487 * @inode_setxattr: 481 * @inode_setxattr:
488 * Check permission before setting the extended attributes 482 * Check permission before setting the extended attributes
489 * @value identified by @name for @dentry. 483 * @value identified by @name for @dentry.
@@ -1502,7 +1496,6 @@ struct security_operations {
1502 int (*inode_permission) (struct inode *inode, int mask); 1496 int (*inode_permission) (struct inode *inode, int mask);
1503 int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); 1497 int (*inode_setattr) (struct dentry *dentry, struct iattr *attr);
1504 int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); 1498 int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry);
1505 void (*inode_delete) (struct inode *inode);
1506 int (*inode_setxattr) (struct dentry *dentry, const char *name, 1499 int (*inode_setxattr) (struct dentry *dentry, const char *name,
1507 const void *value, size_t size, int flags); 1500 const void *value, size_t size, int flags);
1508 void (*inode_post_setxattr) (struct dentry *dentry, const char *name, 1501 void (*inode_post_setxattr) (struct dentry *dentry, const char *name,
@@ -1768,7 +1761,6 @@ int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd);
1768int security_inode_permission(struct inode *inode, int mask); 1761int security_inode_permission(struct inode *inode, int mask);
1769int security_inode_setattr(struct dentry *dentry, struct iattr *attr); 1762int security_inode_setattr(struct dentry *dentry, struct iattr *attr);
1770int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); 1763int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry);
1771void security_inode_delete(struct inode *inode);
1772int security_inode_setxattr(struct dentry *dentry, const char *name, 1764int security_inode_setxattr(struct dentry *dentry, const char *name,
1773 const void *value, size_t size, int flags); 1765 const void *value, size_t size, int flags);
1774void security_inode_post_setxattr(struct dentry *dentry, const char *name, 1766void security_inode_post_setxattr(struct dentry *dentry, const char *name,
@@ -2177,9 +2169,6 @@ static inline int security_inode_getattr(struct vfsmount *mnt,
2177 return 0; 2169 return 0;
2178} 2170}
2179 2171
2180static inline void security_inode_delete(struct inode *inode)
2181{ }
2182
2183static inline int security_inode_setxattr(struct dentry *dentry, 2172static inline int security_inode_setxattr(struct dentry *dentry,
2184 const char *name, const void *value, size_t size, int flags) 2173 const char *name, const void *value, size_t size, int flags)
2185{ 2174{
diff --git a/security/capability.c b/security/capability.c
index b64b50105a04..b855e9f27f0e 100644
--- a/security/capability.c
+++ b/security/capability.c
@@ -195,10 +195,6 @@ static int cap_inode_getattr(struct vfsmount *mnt, struct dentry *dentry)
195 return 0; 195 return 0;
196} 196}
197 197
198static void cap_inode_delete(struct inode *ino)
199{
200}
201
202static void cap_inode_post_setxattr(struct dentry *dentry, const char *name, 198static void cap_inode_post_setxattr(struct dentry *dentry, const char *name,
203 const void *value, size_t size, int flags) 199 const void *value, size_t size, int flags)
204{ 200{
@@ -936,7 +932,6 @@ void security_fixup_ops(struct security_operations *ops)
936 set_to_cap_if_null(ops, inode_permission); 932 set_to_cap_if_null(ops, inode_permission);
937 set_to_cap_if_null(ops, inode_setattr); 933 set_to_cap_if_null(ops, inode_setattr);
938 set_to_cap_if_null(ops, inode_getattr); 934 set_to_cap_if_null(ops, inode_getattr);
939 set_to_cap_if_null(ops, inode_delete);
940 set_to_cap_if_null(ops, inode_setxattr); 935 set_to_cap_if_null(ops, inode_setxattr);
941 set_to_cap_if_null(ops, inode_post_setxattr); 936 set_to_cap_if_null(ops, inode_post_setxattr);
942 set_to_cap_if_null(ops, inode_getxattr); 937 set_to_cap_if_null(ops, inode_getxattr);
diff --git a/security/security.c b/security/security.c
index 5223fa408271..c65b0bca05bb 100644
--- a/security/security.c
+++ b/security/security.c
@@ -550,13 +550,6 @@ int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry)
550 return security_ops->inode_getattr(mnt, dentry); 550 return security_ops->inode_getattr(mnt, dentry);
551} 551}
552 552
553void security_inode_delete(struct inode *inode)
554{
555 if (unlikely(IS_PRIVATE(inode)))
556 return;
557 security_ops->inode_delete(inode);
558}
559
560int security_inode_setxattr(struct dentry *dentry, const char *name, 553int security_inode_setxattr(struct dentry *dentry, const char *name,
561 const void *value, size_t size, int flags) 554 const void *value, size_t size, int flags)
562{ 555{