From 1e08f9ca2c07ed2e080c76f66f50250e62e3bc31 Mon Sep 17 00:00:00 2001 From: som Date: Fri, 1 Apr 2022 20:27:47 +0530 Subject: mm-log: hiding personal info while logging During mm logging, some of the information like simIccId, Telephone numbers need to be hidden from displaying in the logs to protect some of the user information. Implemented for MBIM requiring libmbim 1.27.6, which is the development version that includes the needed API. --- src/mm-context.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mm-context.c') diff --git a/src/mm-context.c b/src/mm-context.c index ee9b372c..37793e5a 100644 --- a/src/mm-context.c +++ b/src/mm-context.c @@ -134,6 +134,7 @@ static const gchar *log_file; static gboolean log_journal; static gboolean log_show_ts; static gboolean log_rel_ts; +static gboolean log_personal_info; static const GOptionEntry log_entries[] = { { @@ -163,6 +164,11 @@ static const GOptionEntry log_entries[] = { "Use relative timestamps (from MM start)", NULL }, + { + "log-personal-info", 0, 0, G_OPTION_ARG_NONE, &log_personal_info, + "Show personal info in logs", + NULL + }, { NULL } }; @@ -210,6 +216,12 @@ mm_context_get_log_relative_timestamps (void) return log_rel_ts; } +gboolean +mm_context_get_log_personal_info (void) +{ + return log_personal_info; +} + /*****************************************************************************/ /* Test context */ -- cgit v1.2.3-70-g09d2