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!
|
// someone wants to be root manager, just check it!
|
||||||
// arg3 should be `/data/user/<userId>/<manager_package_name>`
|
// arg3 should be `/data/user/<userId>/<manager_package_name>`
|
||||||
char param[128];
|
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
|
#ifdef CONFIG_KSU_DEBUG
|
||||||
pr_err("become_manager: copy param err\n");
|
pr_err("become_manager: copy param err\n");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
|
||||||
#define ksu_strncpy_from_user_nofault strncpy_from_unsafe_user
|
#define ksu_strncpy_from_user_nofault strncpy_from_unsafe_user
|
||||||
#else
|
#else
|
||||||
#define ksu_strncpy_from_user_nofault strncpy_from_user
|
#define ksu_strncpy_from_user_nofault probe_kernel_read
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user