@@ -86,15 +86,15 @@ void test_run_root_cmd(const char * shell) {
8686 printf (" test_run_root_cmd result:%s\n " , szResult);
8787}
8888
89- void test_su_allow (unsigned int pid, const char * su_folder_path) {
90- printf (" test_su_inject (%d, %s)\n " , pid, su_folder_path);
89+ void test_su_env_inject (unsigned int pid, const char * su_folder_path) {
90+ printf (" test_su_env_inject (%d, %s)\n " , pid, su_folder_path);
9191 ssize_t ret = inject_process_env64_PATH_wrapper (ROOT_KEY, pid, su_folder_path);
92- printf (" test_su_inject ret val:%zd\n " , ret);
92+ printf (" test_su_env_inject ret val:%zd\n " , ret);
9393}
9494
95- void test_auto_su_allow (const char * target_cmdline, const char * su_folder_path)
95+ void test_auto_su_env_inject (const char * target_cmdline, const char * su_folder_path)
9696{
97- printf (" test_auto_su_allow Waiting for process creation(%s, %s)\n " , target_cmdline, su_folder_path);
97+ printf (" test_auto_su_env_inject Waiting for process creation(%s, %s)\n " , target_cmdline, su_folder_path);
9898
9999 int pid = -1 ;
100100 while (1 )
@@ -107,9 +107,9 @@ void test_auto_su_allow(const char* target_cmdline, const char * su_folder_path)
107107 }
108108 break ;
109109 }
110- printf (" test_auto_su_allow (%d, %s)\n " , pid, su_folder_path);
110+ printf (" test_auto_su_env_inject (%d, %s)\n " , pid, su_folder_path);
111111 ssize_t ret = inject_process_env64_PATH_wrapper (ROOT_KEY, pid, su_folder_path);
112- printf (" test_auto_su_allow ret val:%zd\n " , ret);
112+ printf (" test_auto_su_env_inject ret val:%zd\n " , ret);
113113}
114114int main (int argc, char *argv[])
115115{
@@ -168,15 +168,15 @@ int main(int argc, char *argv[])
168168 unsigned int target_pid = 0 ;
169169 sstrCmd >> target_pid;
170170 if (target_pid) {
171- test_su_allow (target_pid, " /data/local/tmp" );
171+ test_su_env_inject (target_pid, " /data/local/tmp" );
172172 }
173173
174174 }
175175 else if (argc > 1 && strcmp (argv[0 ], " autosu" ) == 0 ) { // 8.授予ROOT到其他进程
176176 std::stringstream sstrCmd;
177177 sstrCmd << argv[1 ];
178178 if (sstrCmd.str ().length ()) {
179- test_auto_su_allow (sstrCmd.str ().c_str (), " /data/local/tmp" );
179+ test_auto_su_env_inject (sstrCmd.str ().c_str (), " /data/local/tmp" );
180180 }
181181
182182 }
0 commit comments