diff options
Diffstat (limited to 'include/linux/security.h')
-rw-r--r-- | include/linux/security.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index ef753654daa5..7cbef482e13a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1499,15 +1499,11 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd, | |||
1499 | 1499 | ||
1500 | static inline int security_inode_alloc (struct inode *inode) | 1500 | static inline int security_inode_alloc (struct inode *inode) |
1501 | { | 1501 | { |
1502 | if (unlikely (IS_PRIVATE (inode))) | ||
1503 | return 0; | ||
1504 | return security_ops->inode_alloc_security (inode); | 1502 | return security_ops->inode_alloc_security (inode); |
1505 | } | 1503 | } |
1506 | 1504 | ||
1507 | static inline void security_inode_free (struct inode *inode) | 1505 | static inline void security_inode_free (struct inode *inode) |
1508 | { | 1506 | { |
1509 | if (unlikely (IS_PRIVATE (inode))) | ||
1510 | return; | ||
1511 | security_ops->inode_free_security (inode); | 1507 | security_ops->inode_free_security (inode); |
1512 | } | 1508 | } |
1513 | 1509 | ||
@@ -2617,6 +2613,25 @@ static inline int security_netlink_recv (struct sk_buff *skb) | |||
2617 | return cap_netlink_recv (skb); | 2613 | return cap_netlink_recv (skb); |
2618 | } | 2614 | } |
2619 | 2615 | ||
2616 | static inline struct dentry *securityfs_create_dir(const char *name, | ||
2617 | struct dentry *parent) | ||
2618 | { | ||
2619 | return ERR_PTR(-ENODEV); | ||
2620 | } | ||
2621 | |||
2622 | static inline struct dentry *securityfs_create_file(const char *name, | ||
2623 | mode_t mode, | ||
2624 | struct dentry *parent, | ||
2625 | void *data, | ||
2626 | struct file_operations *fops) | ||
2627 | { | ||
2628 | return ERR_PTR(-ENODEV); | ||
2629 | } | ||
2630 | |||
2631 | static inline void securityfs_remove(struct dentry *dentry) | ||
2632 | { | ||
2633 | } | ||
2634 | |||
2620 | #endif /* CONFIG_SECURITY */ | 2635 | #endif /* CONFIG_SECURITY */ |
2621 | 2636 | ||
2622 | #ifdef CONFIG_SECURITY_NETWORK | 2637 | #ifdef CONFIG_SECURITY_NETWORK |