aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/security.h49
1 files changed, 0 insertions, 49 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 875225bf8986..55b02e1c73f4 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -281,11 +281,6 @@ struct swap_info_struct;
281 * @dir contains the inode structure of the parent directory of the new link. 281 * @dir contains the inode structure of the parent directory of the new link.
282 * @new_dentry contains the dentry structure for the new link. 282 * @new_dentry contains the dentry structure for the new link.
283 * Return 0 if permission is granted. 283 * Return 0 if permission is granted.
284 * @inode_post_link:
285 * Set security attributes for a new hard link to a file.
286 * @old_dentry contains the dentry structure for the existing link.
287 * @dir contains the inode structure of the parent directory of the new file.
288 * @new_dentry contains the dentry structure for the new file link.
289 * @inode_unlink: 284 * @inode_unlink:
290 * Check the permission to remove a hard link to a file. 285 * Check the permission to remove a hard link to a file.
291 * @dir contains the inode structure of parent directory of the file. 286 * @dir contains the inode structure of parent directory of the file.
@@ -326,12 +321,6 @@ struct swap_info_struct;
326 * @new_dir contains the inode structure for parent of the new link. 321 * @new_dir contains the inode structure for parent of the new link.
327 * @new_dentry contains the dentry structure of the new link. 322 * @new_dentry contains the dentry structure of the new link.
328 * Return 0 if permission is granted. 323 * Return 0 if permission is granted.
329 * @inode_post_rename:
330 * Set security attributes on a renamed file or directory.
331 * @old_dir contains the inode structure for parent of the old link.
332 * @old_dentry contains the dentry structure of the old link.
333 * @new_dir contains the inode structure for parent of the new link.
334 * @new_dentry contains the dentry structure of the new link.
335 * @inode_readlink: 324 * @inode_readlink:
336 * Check the permission to read the symbolic link. 325 * Check the permission to read the symbolic link.
337 * @dentry contains the dentry structure for the file link. 326 * @dentry contains the dentry structure for the file link.
@@ -1080,8 +1069,6 @@ struct security_operations {
1080 struct dentry *dentry, int mode); 1069 struct dentry *dentry, int mode);
1081 int (*inode_link) (struct dentry *old_dentry, 1070 int (*inode_link) (struct dentry *old_dentry,
1082 struct inode *dir, struct dentry *new_dentry); 1071 struct inode *dir, struct dentry *new_dentry);
1083 void (*inode_post_link) (struct dentry *old_dentry,
1084 struct inode *dir, struct dentry *new_dentry);
1085 int (*inode_unlink) (struct inode *dir, struct dentry *dentry); 1072 int (*inode_unlink) (struct inode *dir, struct dentry *dentry);
1086 int (*inode_symlink) (struct inode *dir, 1073 int (*inode_symlink) (struct inode *dir,
1087 struct dentry *dentry, const char *old_name); 1074 struct dentry *dentry, const char *old_name);
@@ -1091,10 +1078,6 @@ struct security_operations {
1091 int mode, dev_t dev); 1078 int mode, dev_t dev);
1092 int (*inode_rename) (struct inode *old_dir, struct dentry *old_dentry, 1079 int (*inode_rename) (struct inode *old_dir, struct dentry *old_dentry,
1093 struct inode *new_dir, struct dentry *new_dentry); 1080 struct inode *new_dir, struct dentry *new_dentry);
1094 void (*inode_post_rename) (struct inode *old_dir,
1095 struct dentry *old_dentry,
1096 struct inode *new_dir,
1097 struct dentry *new_dentry);
1098 int (*inode_readlink) (struct dentry *dentry); 1081 int (*inode_readlink) (struct dentry *dentry);
1099 int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd); 1082 int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd);
1100 int (*inode_permission) (struct inode *inode, int mask, struct nameidata *nd); 1083 int (*inode_permission) (struct inode *inode, int mask, struct nameidata *nd);
@@ -1459,15 +1442,6 @@ static inline int security_inode_link (struct dentry *old_dentry,
1459 return security_ops->inode_link (old_dentry, dir, new_dentry); 1442 return security_ops->inode_link (old_dentry, dir, new_dentry);
1460} 1443}
1461 1444
1462static inline void security_inode_post_link (struct dentry *old_dentry,
1463 struct inode *dir,
1464 struct dentry *new_dentry)
1465{
1466 if (new_dentry->d_inode && unlikely (IS_PRIVATE (new_dentry->d_inode)))
1467 return;
1468 security_ops->inode_post_link (old_dentry, dir, new_dentry);
1469}
1470
1471static inline int security_inode_unlink (struct inode *dir, 1445static inline int security_inode_unlink (struct inode *dir,
1472 struct dentry *dentry) 1446 struct dentry *dentry)
1473{ 1447{
@@ -1523,18 +1497,6 @@ static inline int security_inode_rename (struct inode *old_dir,
1523 new_dir, new_dentry); 1497 new_dir, new_dentry);
1524} 1498}
1525 1499
1526static inline void security_inode_post_rename (struct inode *old_dir,
1527 struct dentry *old_dentry,
1528 struct inode *new_dir,
1529 struct dentry *new_dentry)
1530{
1531 if (unlikely (IS_PRIVATE (old_dentry->d_inode) ||
1532 (new_dentry->d_inode && IS_PRIVATE (new_dentry->d_inode))))
1533 return;
1534 security_ops->inode_post_rename (old_dir, old_dentry,
1535 new_dir, new_dentry);
1536}
1537
1538static inline int security_inode_readlink (struct dentry *dentry) 1500static inline int security_inode_readlink (struct dentry *dentry)
1539{ 1501{
1540 if (unlikely (IS_PRIVATE (dentry->d_inode))) 1502 if (unlikely (IS_PRIVATE (dentry->d_inode)))
@@ -2157,11 +2119,6 @@ static inline int security_inode_link (struct dentry *old_dentry,
2157 return 0; 2119 return 0;
2158} 2120}
2159 2121
2160static inline void security_inode_post_link (struct dentry *old_dentry,
2161 struct inode *dir,
2162 struct dentry *new_dentry)
2163{ }
2164
2165static inline int security_inode_unlink (struct inode *dir, 2122static inline int security_inode_unlink (struct inode *dir,
2166 struct dentry *dentry) 2123 struct dentry *dentry)
2167{ 2124{
@@ -2203,12 +2160,6 @@ static inline int security_inode_rename (struct inode *old_dir,
2203 return 0; 2160 return 0;
2204} 2161}
2205 2162
2206static inline void security_inode_post_rename (struct inode *old_dir,
2207 struct dentry *old_dentry,
2208 struct inode *new_dir,
2209 struct dentry *new_dentry)
2210{ }
2211
2212static inline int security_inode_readlink (struct dentry *dentry) 2163static inline int security_inode_readlink (struct dentry *dentry)
2213{ 2164{
2214 return 0; 2165 return 0;