@@ -587,11 +587,9 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
587
587
try_umount (entry -> umountable , MNT_DETACH );
588
588
}
589
589
590
+ // unconditional umount for modules.img
590
591
try_umount ("/data/adb/modules" , MNT_DETACH );
591
592
592
- // try umount ksu temp path
593
- try_umount ("/debug_ramdisk" , MNT_DETACH );
594
-
595
593
return 0 ;
596
594
}
597
595
@@ -606,13 +604,13 @@ int ksu_mount_monitor(const char *dev_name, const char *dirname, const char *typ
606
604
goto out ;
607
605
}
608
606
609
- // overlay, overlayfs, change pattern later
610
- if ( strstr ( fstype_copy , "overlay" ) && (strncmp (device_name_copy , "KSU " , 3 ) == 0 ) ) {
607
+ // KSU devname, overlay/fs and tmpfs
608
+ if ( ! strncmp ( device_name_copy , "KSU" , 3 ) && ( strstr ( fstype_copy , "overlay" ) || ! strncmp (fstype_copy , "tmpfs " , 5 ) ) ) {
611
609
new_entry = kmalloc (sizeof (* new_entry ), GFP_KERNEL );
612
610
if (new_entry ) {
613
611
new_entry -> umountable = kstrdup (dirname , GFP_KERNEL );
614
612
list_add (& new_entry -> list , & mount_list );
615
- pr_info ("security_sb_mount : devicename %s fstype: %s path: %s\n" , device_name_copy , fstype_copy , new_entry -> umountable );
613
+ pr_info ("ksu_mount_monitor : devicename %s fstype: %s path: %s\n" , device_name_copy , fstype_copy , new_entry -> umountable );
616
614
}
617
615
}
618
616
out :
0 commit comments