]>
Commit | Line | Data |
---|---|---|
1 | diff -up tigervnc-1.0.90-20100721svn4113/vncviewer/UserDialog.cxx.102434 tigervnc-1.0.90-20100721svn4113/vncviewer/UserDialog.cxx | |
2 | --- tigervnc-1.0.90-20100721svn4113/vncviewer/UserDialog.cxx.102434 2010-07-20 17:07:44.000000000 +0200 | |
3 | +++ tigervnc-1.0.90-20100721svn4113/vncviewer/UserDialog.cxx 2010-07-21 17:02:09.900085594 +0200 | |
4 | @@ -40,6 +40,8 @@ | |
5 | #include "fltk_layout.h" | |
6 | #include "parameters.h" | |
7 | #include "UserDialog.h" | |
8 | +#include <string> | |
9 | +#include <iostream> | |
10 | ||
11 | using namespace rfb; | |
12 | ||
13 | @@ -214,6 +216,15 @@ void CConn::getUserPasswd(char** user, c | |
14 | return; | |
15 | } | |
16 | ||
17 | + /* XXX Who wrote this code? Yes, it is really ugly */ | |
18 | + if (passwdInput) { | |
19 | + std::string s; | |
20 | + std::cin >> s; | |
21 | + *password = strdup(s.c_str()); | |
22 | + if (user) *user = 0; | |
23 | + return; | |
24 | + } | |
25 | + | |
26 | if (!user) { | |
27 | fl_message_title(_("VNC authentication")); | |
28 | *password = strDup(fl_password(_("Password:"), "")); | |
29 | diff -up tigervnc-1.0.90-20100721svn4113/vncviewer/parameters.h.102434 tigervnc-1.0.90-20100721svn4113/vncviewer/parameters.h | |
30 | --- tigervnc-1.0.90-20100721svn4113/vncviewer/parameters.h.102434 2009-03-23 17:49:47.000000000 +0100 | |
31 | +++ tigervnc-1.0.90-20100721svn4113/vncviewer/parameters.h 2010-07-21 16:55:44.414314911 +0200 | |
32 | @@ -42,6 +42,7 @@ extern rfb::BoolParameter customCompress | |
33 | extern rfb::IntParameter compressLevel; | |
34 | extern rfb::BoolParameter noJpeg; | |
35 | extern rfb::IntParameter qualityLevel; | |
36 | +extern rfb::BoolParameter passwdInput; | |
37 | ||
38 | extern char aboutText[]; | |
39 | extern char* programName; | |
40 | diff -up tigervnc-1.0.90-20100721svn4113/vncviewer/parameters.cxx.102434 tigervnc-1.0.90-20100721svn4113/vncviewer/parameters.cxx | |
41 | --- tigervnc-1.0.90-20100721svn4113/vncviewer/parameters.cxx.102434 2010-04-23 16:06:38.000000000 +0200 | |
42 | +++ tigervnc-1.0.90-20100721svn4113/vncviewer/parameters.cxx 2010-07-21 17:01:05.979161234 +0200 | |
43 | @@ -59,6 +59,7 @@ IntParameter wmDecorationHeight("WMDecor | |
44 | StringParameter passwordFile("PasswordFile", | |
45 | "Password file for VNC authentication", ""); | |
46 | AliasParameter passwd("passwd", "Alias for PasswordFile", &passwordFile); | |
47 | +BoolParameter passwdInput("passwdInput", "Gets password from stdin", false); | |
48 | ||
49 | BoolParameter autoSelect("AutoSelect", | |
50 | "Auto select pixel format and encoding. " | |
51 | diff -up tigervnc-1.0.90-20100721svn4113/vncviewer/vncviewer.man.102434 tigervnc-1.0.90-20100721svn4113/vncviewer/vncviewer.man | |
52 | --- tigervnc-1.0.90-20100721svn4113/vncviewer/vncviewer.man.102434 2009-10-07 17:13:00.000000000 +0200 | |
53 | +++ tigervnc-1.0.90-20100721svn4113/vncviewer/vncviewer.man 2010-07-21 16:55:44.414314911 +0200 | |
54 | @@ -119,6 +119,11 @@ the server, you can specify it here to a | |
55 | "~/.vnc/passwd". | |
56 | ||
57 | .TP | |
58 | +.B \-passwdInput \fItrue, false\fP | |
59 | +Force standard vnc dialog to getting password and reads password from stdin. | |
60 | +Default is false(shows dialog window) | |
61 | + | |
62 | +.TP | |
63 | .B \-Shared | |
64 | When you make a connection to a VNC server, all other existing connections are | |
65 | normally closed. This option requests that they be left open, allowing you to |