kernel: Fix manager recognize err
This commit is contained in:
@@ -232,7 +232,7 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
|
||||
// someone wants to be root manager, just check it!
|
||||
// arg3 should be `/data/user/<userId>/<manager_package_name>`
|
||||
char param[128];
|
||||
if (ksu_strncpy_from_user_nofault(param, arg3, sizeof(param))) {
|
||||
if (ksu_strncpy_from_user_nofault(param, arg3, sizeof(param)) == -EFAULT) {
|
||||
#ifdef CONFIG_KSU_DEBUG
|
||||
pr_err("become_manager: copy param err\n");
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
|
||||
#define ksu_strncpy_from_user_nofault strncpy_from_unsafe_user
|
||||
#else
|
||||
#define ksu_strncpy_from_user_nofault strncpy_from_user
|
||||
#define ksu_strncpy_from_user_nofault probe_kernel_read
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
||||
|
||||
Reference in New Issue
Block a user