(empty log message)
@@ -928,7 +928,22 @@ | ||
928 | 928 | return ccs_mount_permission(dev_name, path, type, flags, data_page); |
929 | 929 | } |
930 | 930 | |
931 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) | |
931 | 932 | /** |
933 | + * ccs_move_mount - Check permission for move_mount() operation. | |
934 | + * | |
935 | + * @from_path: Pointer to "struct path". | |
936 | + * @to_path: Pointer to "struct path". | |
937 | + * | |
938 | + * Returns 0 on success, negative value otherwise. | |
939 | + */ | |
940 | +static int ccs_move_mount(const struct path *from_path, const struct path *to_path) | |
941 | +{ | |
942 | + return ccs_move_mount_permission(from_path, to_path); | |
943 | +} | |
944 | +#endif | |
945 | + | |
946 | +/** | |
932 | 947 | * ccs_sb_umount - Check permission for umount(). |
933 | 948 | * |
934 | 949 | * @mnt: Pointer to "struct vfsmount". |
@@ -989,6 +1004,9 @@ | ||
989 | 1004 | MY_HOOK_INIT(file_ioctl, ccs_file_ioctl), |
990 | 1005 | MY_HOOK_INIT(sb_pivotroot, ccs_sb_pivotroot), |
991 | 1006 | MY_HOOK_INIT(sb_mount, ccs_sb_mount), |
1007 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) | |
1008 | + MY_HOOK_INIT(move_mount, ccs_move_mount), | |
1009 | +#endif | |
992 | 1010 | MY_HOOK_INIT(sb_umount, ccs_sb_umount), |
993 | 1011 | #ifdef CONFIG_SECURITY_PATH |
994 | 1012 | MY_HOOK_INIT(path_mknod, ccs_path_mknod), |
@@ -2035,6 +2035,14 @@ | ||
2035 | 2035 | #endif |
2036 | 2036 | |
2037 | 2037 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) |
2038 | +/** | |
2039 | + * __ccs_move_mount_permission - Check permission for move_mount() operation. | |
2040 | + * | |
2041 | + * @from_path: Pointer to "struct path". | |
2042 | + * @to_path: Pointer to "struct path". | |
2043 | + * | |
2044 | + * Returns 0 on success, negative value otherwise. | |
2045 | + */ | |
2038 | 2046 | static int __ccs_move_mount_permission(const struct path *from_path, |
2039 | 2047 | const struct path *to_path) |
2040 | 2048 | { |