[network-manager-openvpn/rm-userset] auth-dialog: don't print NULL secrets



commit 6645be5338463d0b55288b6f6b1603f961593967
Author: Dan Williams <dcbw redhat com>
Date:   Sat Feb 12 22:39:34 2011 -0600

    auth-dialog: don't print NULL secrets
    
    Which glibc helpfully turns into "(null)" for us, confusing things.

 auth-dialog/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 45eb705..1c7a53f 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -295,9 +295,9 @@ main (int argc, char *argv[])
 	                 &new_password,
 	                 g_hash_table_lookup (secrets, NM_OPENVPN_KEY_CERTPASS),
 	                 &new_certpass)) {
-		if (need_password)
+		if (need_password && new_password)
 			printf ("%s\n%s\n", NM_OPENVPN_KEY_PASSWORD, new_password);
-		if (need_certpass)
+		if (need_certpass && new_certpass)
 			printf ("%s\n%s\n", NM_OPENVPN_KEY_CERTPASS, new_certpass);
 	}
 	printf ("\n\n");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]