summaryrefslogtreecommitdiff
path: root/clients/common/nm-client-utils.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-12-15 16:51:59 +0100
committerLubomir Rintel <lkundrak@v3.sk>2017-12-18 14:47:37 +0100
commit9d95e1f1753a6c3d72ecf5609c60f916b8238308 (patch)
tree9a3dae246ddcbcfd790f3d1f0c37bddb4615287a /clients/common/nm-client-utils.c
parent9e4de97967c67e41eaab288e0bd3bfabbda20797 (diff)
downloadNetworkManager-9d95e1f1753a6c3d72ecf5609c60f916b8238308.tar.gz
clients/cli: use a nicer password prompt
Makes sense in order for the user to know that they're actually typing the password (edited just to illustrate the point, the actual output was shamefully messy and perhaps needs fixing too): $ nmcli c up Wrathmosphere Passwords or encryption keys are required to access the wireless network 'Wrathmosphere'. Password (802-1x.password): *********
Diffstat (limited to 'clients/common/nm-client-utils.c')
-rw-r--r--clients/common/nm-client-utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/clients/common/nm-client-utils.c b/clients/common/nm-client-utils.c
index dd46ecfcc3..6422164600 100644
--- a/clients/common/nm-client-utils.c
+++ b/clients/common/nm-client-utils.c
@@ -561,3 +561,17 @@ nmc_wifi_strength_bars (guint8 strength)
else
return /* ____ */ "____";
}
+
+/**
+ * nmc_utils_password_subst_char:
+ *
+ * Returns: the string substituted when hiding actual password glyphs
+ */
+const char *
+nmc_password_subst_char (void)
+{
+ if (can_show_graphics ())
+ return "\u2022"; /* Bullet */
+ else
+ return "*";
+}