|
@@ -459,6 +459,10 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
|
|
* @uid contains new owner's ID.
|
|
* @uid contains new owner's ID.
|
|
* @gid contains new group's ID.
|
|
* @gid contains new group's ID.
|
|
* Return 0 if permission is granted.
|
|
* Return 0 if permission is granted.
|
|
|
|
+ * @path_chroot:
|
|
|
|
+ * Check for permission to change root directory.
|
|
|
|
+ * @path contains the path structure.
|
|
|
|
+ * Return 0 if permission is granted.
|
|
* @inode_readlink:
|
|
* @inode_readlink:
|
|
* Check the permission to read the symbolic link.
|
|
* Check the permission to read the symbolic link.
|
|
* @dentry contains the dentry structure for the file link.
|
|
* @dentry contains the dentry structure for the file link.
|
|
@@ -1503,6 +1507,7 @@ struct security_operations {
|
|
int (*path_chmod) (struct dentry *dentry, struct vfsmount *mnt,
|
|
int (*path_chmod) (struct dentry *dentry, struct vfsmount *mnt,
|
|
mode_t mode);
|
|
mode_t mode);
|
|
int (*path_chown) (struct path *path, uid_t uid, gid_t gid);
|
|
int (*path_chown) (struct path *path, uid_t uid, gid_t gid);
|
|
|
|
+ int (*path_chroot) (struct path *path);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
int (*inode_alloc_security) (struct inode *inode);
|
|
int (*inode_alloc_security) (struct inode *inode);
|
|
@@ -2970,6 +2975,7 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
|
|
int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
|
|
int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
|
|
mode_t mode);
|
|
mode_t mode);
|
|
int security_path_chown(struct path *path, uid_t uid, gid_t gid);
|
|
int security_path_chown(struct path *path, uid_t uid, gid_t gid);
|
|
|
|
+int security_path_chroot(struct path *path);
|
|
#else /* CONFIG_SECURITY_PATH */
|
|
#else /* CONFIG_SECURITY_PATH */
|
|
static inline int security_path_unlink(struct path *dir, struct dentry *dentry)
|
|
static inline int security_path_unlink(struct path *dir, struct dentry *dentry)
|
|
{
|
|
{
|
|
@@ -3031,6 +3037,11 @@ static inline int security_path_chown(struct path *path, uid_t uid, gid_t gid)
|
|
{
|
|
{
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+static inline int security_path_chroot(struct path *path)
|
|
|
|
+{
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
#endif /* CONFIG_SECURITY_PATH */
|
|
#endif /* CONFIG_SECURITY_PATH */
|
|
|
|
|
|
#ifdef CONFIG_KEYS
|
|
#ifdef CONFIG_KEYS
|