diff options
Diffstat (limited to 'include/linux/security.h')
-rw-r--r-- | include/linux/security.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index c8a584c26f7b..ed0faea60b82 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -459,6 +459,10 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
459 | * @uid contains new owner's ID. | 459 | * @uid contains new owner's ID. |
460 | * @gid contains new group's ID. | 460 | * @gid contains new group's ID. |
461 | * Return 0 if permission is granted. | 461 | * Return 0 if permission is granted. |
462 | * @path_chroot: | ||
463 | * Check for permission to change root directory. | ||
464 | * @path contains the path structure. | ||
465 | * Return 0 if permission is granted. | ||
462 | * @inode_readlink: | 466 | * @inode_readlink: |
463 | * Check the permission to read the symbolic link. | 467 | * Check the permission to read the symbolic link. |
464 | * @dentry contains the dentry structure for the file link. | 468 | * @dentry contains the dentry structure for the file link. |
@@ -1503,6 +1507,7 @@ struct security_operations { | |||
1503 | int (*path_chmod) (struct dentry *dentry, struct vfsmount *mnt, | 1507 | int (*path_chmod) (struct dentry *dentry, struct vfsmount *mnt, |
1504 | mode_t mode); | 1508 | mode_t mode); |
1505 | int (*path_chown) (struct path *path, uid_t uid, gid_t gid); | 1509 | int (*path_chown) (struct path *path, uid_t uid, gid_t gid); |
1510 | int (*path_chroot) (struct path *path); | ||
1506 | #endif | 1511 | #endif |
1507 | 1512 | ||
1508 | int (*inode_alloc_security) (struct inode *inode); | 1513 | int (*inode_alloc_security) (struct inode *inode); |
@@ -2970,6 +2975,7 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry, | |||
2970 | int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, | 2975 | int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, |
2971 | mode_t mode); | 2976 | mode_t mode); |
2972 | int security_path_chown(struct path *path, uid_t uid, gid_t gid); | 2977 | int security_path_chown(struct path *path, uid_t uid, gid_t gid); |
2978 | int security_path_chroot(struct path *path); | ||
2973 | #else /* CONFIG_SECURITY_PATH */ | 2979 | #else /* CONFIG_SECURITY_PATH */ |
2974 | static inline int security_path_unlink(struct path *dir, struct dentry *dentry) | 2980 | static inline int security_path_unlink(struct path *dir, struct dentry *dentry) |
2975 | { | 2981 | { |
@@ -3031,6 +3037,11 @@ static inline int security_path_chown(struct path *path, uid_t uid, gid_t gid) | |||
3031 | { | 3037 | { |
3032 | return 0; | 3038 | return 0; |
3033 | } | 3039 | } |
3040 | |||
3041 | static inline int security_path_chroot(struct path *path) | ||
3042 | { | ||
3043 | return 0; | ||
3044 | } | ||
3034 | #endif /* CONFIG_SECURITY_PATH */ | 3045 | #endif /* CONFIG_SECURITY_PATH */ |
3035 | 3046 | ||
3036 | #ifdef CONFIG_KEYS | 3047 | #ifdef CONFIG_KEYS |