aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-08-20 08:49:47 +0000
committerMartin Willi <martin@strongswan.org>2008-08-20 08:49:47 +0000
commit592dc30108c0f850a14cdf14a9fde4d974a6d9d1 (patch)
treebd1e18e5a7dea1c7ffa6030eb4eeeefc07e2095c
parent59bb33e1e0e382c5b2ee193f8264c2dbbb2a3f9b (diff)
downloadstrongswan-592dc30108c0f850a14cdf14a9fde4d974a6d9d1.tar.bz2
strongswan-592dc30108c0f850a14cdf14a9fde4d974a6d9d1.tar.xz
fixed auth-dialog password flush
-rw-r--r--src/charon/plugins/nm/gnome/auth-dialog/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/charon/plugins/nm/gnome/auth-dialog/main.c b/src/charon/plugins/nm/gnome/auth-dialog/main.c
index b9aea8d6f..228aa29b1 100644
--- a/src/charon/plugins/nm/gnome/auth-dialog/main.c
+++ b/src/charon/plugins/nm/gnome/auth-dialog/main.c
@@ -1,6 +1,8 @@
/*
* Copyright (C) 2008 Martin Willi
* Hochschule fuer Technik Rapperswil
+ * Copyright (C) 2004 Dan Williams
+ * Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -60,6 +62,7 @@ int main (int argc, char *argv[])
GOptionContext *context;
GnomeProgram *program = NULL;
int exit_status = 1;
+ char buf;
guint32 itemid;
GtkWidget *dialog;
GOptionEntry entries[] = {
@@ -134,7 +137,11 @@ int main (int argc, char *argv[])
break;
}
}
- printf("password\n%s\n\n\n", pass);
+ printf("password\n%s\n", pass);
+ printf("\n\n", pass);
+ /* flush output, wait for input */
+ fflush(stdout);
+ fread(&buf, 1, sizeof(buf), stdin);
g_object_unref(program);
return 0;
}