@@ -86,15 +86,15 @@ void test_run_root_cmd(const char * shell) { |
86 | 86 | printf("test_run_root_cmd result:%s\n", szResult); |
87 | 87 | } |
88 | 88 |
|
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); |
91 | 91 | 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); |
93 | 93 | } |
94 | 94 |
|
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) |
96 | 96 | { |
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); |
98 | 98 |
|
99 | 99 | int pid = -1; |
100 | 100 | while (1) |
@@ -107,9 +107,9 @@ void test_auto_su_allow(const char* target_cmdline, const char * su_folder_path) |
107 | 107 | } |
108 | 108 | break; |
109 | 109 | } |
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); |
111 | 111 | 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); |
113 | 113 | } |
114 | 114 | int main(int argc, char *argv[]) |
115 | 115 | { |
@@ -168,15 +168,15 @@ int main(int argc, char *argv[]) |
168 | 168 | unsigned int target_pid = 0; |
169 | 169 | sstrCmd >> target_pid; |
170 | 170 | if (target_pid) { |
171 | | - test_su_allow(target_pid, "/data/local/tmp"); |
| 171 | + test_su_env_inject(target_pid, "/data/local/tmp"); |
172 | 172 | } |
173 | 173 |
|
174 | 174 | } |
175 | 175 | else if (argc > 1 && strcmp(argv[0], "autosu") == 0) { //8.授予ROOT到其他进程 |
176 | 176 | std::stringstream sstrCmd; |
177 | 177 | sstrCmd << argv[1]; |
178 | 178 | 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"); |
180 | 180 | } |
181 | 181 |
|
182 | 182 | } |
|