[PATCH] test: don't print Passphrase

Jussi Kukkonen jku at linux.intel.com
Tue Jan 25 01:29:53 PST 2011


The test scripts are useful when asking users for debugging info,
but the sensitive information makes using the output on open forums
problematic.
---
 test/get-services  |    2 ++
 test/list-services |    2 ++
 test/test-manager  |    2 ++
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/test/get-services b/test/get-services
index 29d4ea0..8088012 100755
--- a/test/get-services
+++ b/test/get-services
@@ -50,6 +50,8 @@ for entry in services:
 				val = "false"
 		elif key in ["Strength"]:
 			val = int(properties[key])
+		elif key in ["Passphrase"]:
+			val = "<redacted>"
 		else:
 			val = str(properties[key])
 		print "    %s = %s" % (key, val)
diff --git a/test/list-services b/test/list-services
index 66dfe5c..238d677 100755
--- a/test/list-services
+++ b/test/list-services
@@ -56,6 +56,8 @@ for path in properties["Services"]:
 				val = "false"
 		elif key in ["Strength"]:
 			val = int(properties[key])
+		elif key in ["Passphrase"]:
+			val = "<redacted>"
 		else:
 			val = properties[key]
 		print "    %s = %s" % (key, val)
diff --git a/test/test-manager b/test/test-manager
index b5642d0..0d1ff85 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -74,6 +74,8 @@ def print_properties(key, value):
 
 			elif key in ["Strength", "Priority"]:
 				val = int(properties[key])
+			elif key in ["Passphrase"]:
+				val = "<redacted>"
 			else:
 				val = str(properties[key])
 
-- 
1.7.2.3




More information about the connman mailing list