[Feature][T8TSK-338]The apn password is encrypted or masked in log --ril-service
Only Configure:No
Affected branch:ALL
Affected module:RIL
Is it affected on both ZXIC and MTK: MTK
Self-test: Yes
Doc Update:No
Change-Id: I595fbb97e625db8a46e9848e979bdf0a6766e55e
diff --git a/common_src/framework/lynq-ril-service/src/ril.cpp b/common_src/framework/lynq-ril-service/src/ril.cpp
index 1c0a080..9ae636a 100755
--- a/common_src/framework/lynq-ril-service/src/ril.cpp
+++ b/common_src/framework/lynq-ril-service/src/ril.cpp
@@ -5911,7 +5911,17 @@
{
char *pos, *pos2;
int argc = 0;
- printf("LYNQ_REQUEST cmd=%s\n",cmd);
+ //xy.he@20240524 modify for T8TSK-338 start
+ //printf("LYNQ_REQUEST cmd=%s\n",cmd);
+ if(strstr(cmd,"password") != NULL)
+ {
+ RLOGD("LYNQ_REQUEST cmd=(has got)\n");
+ }
+ else
+ {
+ RLOGD("LYNQ_REQUEST cmd=%s\n",cmd);
+ }
+ //xy.he@20240524 modify for T8TSK-338 end
pos = cmd;
while (1) {
// Trim the space characters.
@@ -6188,10 +6198,17 @@
while(recvfrom(server_socket_fd, buffer, LYNQ_SOCKET_BUFFER,0,(struct sockaddr*)&lynqClient_addr, &client_addr_length) != -1)//add while by hq for bug 760 2023/02/09
{
client_tmp = (lynq_client_t*)buffer;
- RLOGD("[LYNQ socketId] utoken=%d,request=%d,len=%d,param=%s",client_tmp->uToken,client_tmp->request,client_tmp->paramLen,client_tmp->param);
- //char test[36] = {};
- //sprintf(test,"test okay len = %d",client_tmp->paramLen);
- //sendto(server_socket_fd,test,strlen(test),0,(struct sockaddr*)&client_addr,client_addr_length);
+ //xy.he@20240524 modify for T8TSK-338 start
+ if(client_tmp->request != RIL_REQUEST_MODIFY_APN)
+ {
+ RLOGD("[LYNQ socketId] utoken=%d,request=%d,len=%d,param=%s",client_tmp->uToken,client_tmp->request,client_tmp->paramLen,client_tmp->param);
+ }
+ else
+ {
+ RLOGD("[LYNQ socketId] utoken=%d,request=%d,len=%d,param=(has got)",client_tmp->uToken,client_tmp->request,client_tmp->paramLen);
+ encode_log(client_tmp->param,6);
+ }
+ //xy.he@20240524 modify for T8TSK-338 end
argv[0] = (char *)lynq_requset_to_string(client_tmp->request);
argc = 0;
if(client_tmp->paramLen > 0)
@@ -6205,10 +6222,19 @@
}
}
argc = argc+1;
+ //xy.he@20240524 modify for T8TSK-338 start
for(int t = 0;t<argc;t++)
{
- RLOGD("LYNQ_REQUEST argv[%d]=%s\n",t,argv[t]);
+ if(strstr(argv[t],"password") != NULL)
+ {
+ RLOGD("LYNQ_REQUEST argv[%d]=(has got)\n",t);
+ }
+ else
+ {
+ RLOGD("LYNQ_REQUEST argv[%d]=%s\n",t,argv[t]);
+ }
}
+ //xy.he@20240524 modify for T8TSK-338 end
COMMAND *command = find_command(argv[0]);
if(!command)
{