• R/O
  • SSH
  • HTTPS

akari: Commit


Commit MetaInfo

Revision608 (tree)
Zeit2019-07-27 14:49:02
Autorkumaneko

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/akari/lsm-4.12.c (revision 607)
+++ trunk/akari/lsm-4.12.c (revision 608)
@@ -928,7 +928,22 @@
928928 return ccs_mount_permission(dev_name, path, type, flags, data_page);
929929 }
930930
931+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0)
931932 /**
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+/**
932947 * ccs_sb_umount - Check permission for umount().
933948 *
934949 * @mnt: Pointer to "struct vfsmount".
@@ -989,6 +1004,9 @@
9891004 MY_HOOK_INIT(file_ioctl, ccs_file_ioctl),
9901005 MY_HOOK_INIT(sb_pivotroot, ccs_sb_pivotroot),
9911006 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
9921010 MY_HOOK_INIT(sb_umount, ccs_sb_umount),
9931011 #ifdef CONFIG_SECURITY_PATH
9941012 MY_HOOK_INIT(path_mknod, ccs_path_mknod),
--- trunk/akari/permission.c (revision 607)
+++ trunk/akari/permission.c (revision 608)
@@ -2035,6 +2035,14 @@
20352035 #endif
20362036
20372037 #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+ */
20382046 static int __ccs_move_mount_permission(const struct path *from_path,
20392047 const struct path *to_path)
20402048 {
Show on old repository browser