Package list virt-viewer / ad642d7
Remove mozilla-virt-viewer Laurent LĂ©onard 10 years ago
11 changed file(s) with 1 addition(s) and 430 deletion(s). Raw diff Collapse all Expand all
+0
-6
debian/README.source less more
0 Building virt-viewer for Debian
1 -------------------------------
2
3 The virt-viewer source package uses quilt to apply and remove its patches.
4 Please refer to /usr/share/doc/quilt/README.source for information about how to
5 use quilt for source packages.
99 libgtk-vnc-1.0-dev (>= 0.3.4),
1010 libxml2-dev,
1111 libgtk2.0-dev (>= 2.10),
12 xulrunner-dev,
1312 autotools-dev,
14 quilt,
1513 automake,
16 autoconf,
1714 libffi-dev,
1815 libtool,
1916 libglade2-dev,
3532 console The viewer can connect to remote hosts to lookup the console
3633 information and then also connect to the remote console using the same network
3734 transport.
38
39 Package: mozilla-virt-viewer
40 Architecture: any
41 Section: web
42 Depends: ${shlibs:Depends}, ${misc:Depends}, virt-viewer (= ${binary:Version}),
43 iceweasel | iceape-browser
44 Description: A virt-viewer widget for GTK+ (mozilla plugin)
45 The console is accessed using the VNC protocol. The guest can be referred to
46 based on its name, ID, or UUID. If the guest is not already running, then the
47 viewer can be told to wait until is starts before attempting to connect to the
48 console The viewer can connect to remote hosts to lookup the console
49 information and then also connect to the remote console using the same network
50 transport.
51 .
52 This package contains the experimental mozilla plugin. The plugin is not
53 secure. Plase check the README.
54
+0
-1
debian/mozilla-virt-viewer.examples less more
0 plugin/test.html
+0
-1
debian/mozilla-virt-viewer.install less more
0 usr/lib/mozilla/plugins/*.so usr/lib/virt-viewer/plugins/
+0
-2
debian/mozilla-virt-viewer.links less more
0 /usr/lib/virt-viewer/plugins/virt-viewer-plugin.so /usr/lib/iceweasel/plugins/virt-viewer-plugin.so
1 /usr/lib/virt-viewer/plugins/virt-viewer-plugin.so /usr/lib/iceape/plugins/virt-viewer-plugin.so
+0
-272
debian/patches/0001-Fix-build-with-xulrunner-1.9.1.patch less more
0 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
1 Date: Tue, 2 Feb 2010 20:16:52 +0100
2 Subject: Fix build with xulrunner 1.9.1
3
4 ---
5 plugin/npshell.c | 1 -
6 plugin/npunix.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++---
7 2 files changed, 168 insertions(+), 9 deletions(-)
8
9 diff --git a/plugin/npshell.c b/plugin/npshell.c
10 index ccd11a5..c369cf8 100644
11 --- a/plugin/npshell.c
12 +++ b/plugin/npshell.c
13 @@ -84,7 +84,6 @@ Contributor(s): Adobe Systems Incorporated.
14 #include <strings.h>
15
16 #include <npapi.h>
17 -#include <npupp.h>
18
19 #include "virt-viewer-plugin.h"
20
21 diff --git a/plugin/npunix.c b/plugin/npunix.c
22 index ddc4bdf..e17e942 100644
23 --- a/plugin/npunix.c
24 +++ b/plugin/npunix.c
25 @@ -57,7 +57,151 @@
26
27 #include <stdio.h>
28 #include <npapi.h>
29 +#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
30 #include <npupp.h>
31 +#else
32 +#include <npfunctions.h>
33 +// For 1.9 compatibility
34 +// ------------------------------------------------
35 +typedef NPError (*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue);
36 +#define NewNPN_GetValueProc(FUNC) \
37 + ((NPN_GetValueUPP) (FUNC))
38 +#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \
39 + (*(FUNC))((ARG1), (ARG2), (ARG3))
40 +
41 +typedef NPError (*NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue);
42 +#define NewNPN_SetValueProc(FUNC) \
43 + ((NPN_SetValueUPP) (FUNC))
44 +#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \
45 + (*(FUNC))((ARG1), (ARG2), (ARG3))
46 +
47 +typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window);
48 +#define NewNPN_GetURLProc(FUNC) \
49 + ((NPN_GetURLUPP) (FUNC))
50 +#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \
51 + (*(FUNC))((ARG1), (ARG2), (ARG3))
52 +
53 +typedef NPError (*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData);
54 +#define NewNPN_GetURLNotifyProc(FUNC) \
55 + ((NPN_GetURLNotifyUPP) (FUNC))
56 +#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \
57 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))
58 +
59 +typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file);
60 +#define NewNPN_PostURLProc(FUNC) \
61 + ((NPN_PostURLUPP) (FUNC))
62 +#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
63 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
64 +
65 +typedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData);
66 +#define NewNPN_PostURLNotifyProc(FUNC) \
67 + ((NPN_PostURLNotifyUPP) (FUNC))
68 +#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \
69 + (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
70 +
71 +typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList);
72 +#define NewNPN_RequestReadProc(FUNC) \
73 + ((NPN_RequestReadUPP) (FUNC))
74 +#define CallNPN_RequestReadProc(FUNC, stream, range) \
75 + (*(FUNC))((stream), (range))
76 +
77 +typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream);
78 +#define NewNPN_NewStreamProc(FUNC) \
79 + ((NPN_NewStreamUPP) (FUNC))
80 +#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \
81 + (*(FUNC))((npp), (type), (window), (stream))
82 +
83 +typedef int32_t (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32_t len, void* buffer);
84 +#define NewNPN_WriteProc(FUNC) \
85 + ((NPN_WriteUPP) (FUNC))
86 +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \
87 + (*(FUNC))((npp), (stream), (len), (buffer))
88 +
89 +typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason);
90 +#define NewNPN_DestroyStreamProc(FUNC) \
91 + ((NPN_DestroyStreamUPP) (FUNC))
92 +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \
93 + (*(FUNC))((npp), (stream), (reason))
94 +
95 +typedef void (*NPN_StatusUPP)(NPP instance, const char* message);
96 +#define NewNPN_StatusProc(FUNC) \
97 + ((NPN_StatusUPP) (FUNC))
98 +#define CallNPN_StatusProc(FUNC, npp, msg) \
99 + (*(FUNC))((npp), (msg))
100 +
101 +typedef const char* (*NPN_UserAgentUPP)(NPP instance);
102 +#define NewNPN_UserAgentProc(FUNC) \
103 + ((NPN_UserAgentUPP) (FUNC))
104 +#define CallNPN_UserAgentProc(FUNC, ARG1) \
105 + (*(FUNC))((ARG1))
106 +
107 +typedef void* (*NPN_MemAllocUPP)(uint32_t size);
108 +#define NewNPN_MemAllocProc(FUNC) \
109 + ((NPN_MemAllocUPP) (FUNC))
110 +#define CallNPN_MemAllocProc(FUNC, ARG1) \
111 + (*(FUNC))((ARG1))
112 +
113 +typedef void (*NPN_MemFreeUPP)(void* ptr);
114 +#define NewNPN_MemFreeProc(FUNC) \
115 + ((NPN_MemFreeUPP) (FUNC))
116 +#define CallNPN_MemFreeProc(FUNC, ARG1) \
117 + (*(FUNC))((ARG1))
118 +
119 +typedef uint32_t (*NPN_MemFlushUPP)(uint32_t size);
120 +#define NewNPN_MemFlushProc(FUNC) \
121 + ((NPN_MemFlushUPP) (FUNC))
122 +#define CallNPN_MemFlushProc(FUNC, ARG1) \
123 + (*(FUNC))((ARG1))
124 +
125 +typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages);
126 +#define NewNPN_ReloadPluginsProc(FUNC) \
127 + ((NPN_ReloadPluginsUPP) (FUNC))
128 +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \
129 + (*(FUNC))((ARG1))
130 +
131 +typedef void (*NPN_InvalidateRectUPP)(NPP instance, NPRect *rect);
132 +#define NewNPN_InvalidateRectProc(FUNC) \
133 + ((NPN_InvalidateRectUPP) (FUNC))
134 +#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \
135 + (*(FUNC))((ARG1), (ARG2))
136 +
137 +typedef void (*NPN_InvalidateRegionUPP)(NPP instance, NPRegion region);
138 +#define NewNPN_InvalidateRegionProc(FUNC) \
139 + ((NPN_InvalidateRegionUPP) (FUNC))
140 +#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \
141 + (*(FUNC))((ARG1), (ARG2))
142 +
143 +typedef void (*NPN_ForceRedrawUPP)(NPP instance);
144 +#define NewNPN_ForceRedrawProc(FUNC) \
145 + ((NPN_ForceRedrawUPP) (FUNC))
146 +#define CallNPN_ForceRedrawProc(FUNC, ARG1) \
147 + (*(FUNC))((ARG1))
148 +
149 +typedef void* (*NPN_GetJavaEnvUPP)();
150 +#define NewNPN_GetJavaEnvProc(FUNC) \
151 + ((NPN_GetJavaEnvUPP) (FUNC))
152 +#define CallNPN_GetJavaEnvProc(FUNC) \
153 + (*(FUNC))()
154 +
155 +typedef void* (*NPN_GetJavaPeerUPP)(NPP instance);
156 +#define NewNPN_GetJavaPeerProc(FUNC) \
157 + ((NPN_GetJavaPeerUPP) (FUNC))
158 +#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \
159 + (*(FUNC))((ARG1))
160 +
161 +typedef bool (*NPN_PushPopupsEnabledStateUPP)(NPP instance, NPBool enabled);
162 +#define NewNPN_PushPopupsEnabledStateProc(FUNC) \
163 + ((NPN_PushPopupsEnabledStateUPP) (FUNC))
164 +#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \
165 + (*(FUNC))((ARG1), (ARG2))
166 +
167 +typedef bool (*NPN_PopPopupsEnabledStateUPP)(NPP instance);
168 +#define NewNPN_PopPopupsEnabledStateProc(FUNC) \
169 + ((NPN_PopPopupsEnabledStateUPP) (FUNC))
170 +#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \
171 + (*(FUNC))((ARG1))
172 +
173 +#endif
174
175 #include <glib.h> /* just for G_GNUC_UNUSED */
176
177 @@ -134,14 +278,14 @@ NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notify
178
179 NPError
180 NPN_PostURL(NPP instance, const char* url, const char* window,
181 - uint32 len, const char* buf, NPBool file)
182 + uint32_t len, const char* buf, NPBool file)
183 {
184 return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance,
185 url, window, len, buf, file);
186 }
187
188 NPError
189 -NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len,
190 +NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len,
191 const char* buf, NPBool file, void* notifyData)
192 {
193 return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify,
194 @@ -164,7 +308,7 @@ NPN_NewStream(NPP instance, NPMIMEType type, const char *window,
195 }
196
197 int32
198 -NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
199 +NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)
200 {
201 return CallNPN_WriteProc(gNetscapeFuncs.write, instance,
202 stream, len, buffer);
203 @@ -190,7 +334,7 @@ NPN_UserAgent(NPP instance)
204 }
205
206 void*
207 -NPN_MemAlloc(uint32 size)
208 +NPN_MemAlloc(uint32_t size)
209 {
210 return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);
211 }
212 @@ -200,7 +344,7 @@ void NPN_MemFree(void* ptr)
213 CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);
214 }
215
216 -uint32 NPN_MemFlush(uint32 size)
217 +uint32_t NPN_MemFlush(uint32_t size)
218 {
219 return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);
220 }
221 @@ -269,8 +413,8 @@ void NPN_PopPopupsEnabledState(NPP instance)
222 ***********************************************************************/
223
224 static NPError
225 -Private_New(NPMIMEType pluginType, NPP instance, uint16 mode,
226 - int16 argc, char* argn[], char* argv[], NPSavedData* saved)
227 +Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode,
228 + int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
229 {
230 NPError ret;
231 PLUGINDEBUGSTR("New");
232 @@ -315,7 +459,7 @@ Private_WriteReady(NPP instance, NPStream* stream)
233 }
234
235 static int32
236 -Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len,
237 +Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len,
238 void* buffer)
239 {
240 unsigned int result;
241 @@ -501,6 +645,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
242 */
243 pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
244 pluginFuncs->size = sizeof(NPPluginFuncs);
245 +#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
246 pluginFuncs->newp = NewNPP_NewProc(Private_New);
247 pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);
248 pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);
249 @@ -513,6 +658,21 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
250 pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
251 pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
252 pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent);
253 +#else
254 + pluginFuncs->newp = (NPP_NewProcPtr)(Private_New);
255 + pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy);
256 + pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow);
257 + pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream);
258 + pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream);
259 + pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile);
260 + pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady);
261 + pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write);
262 + pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print);
263 + pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify);
264 + pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue);
265 + pluginFuncs->event = (NPP_HandleEventProcPtr)(Private_HandleEvent);
266 +#endif
267 +
268 #ifdef OJI
269 pluginFuncs->javaClass = Private_GetJavaClass();
270 #endif
271 --
+0
-23
debian/patches/0002-Define-GLADE_DIR.patch less more
0 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
1 Date: Tue, 2 Feb 2010 20:44:38 +0100
2 Subject: Define GLADE_DIR
3
4 so the plugin can find the glade files.
5 ---
6 plugin/Makefile.am | 2 ++
7 1 files changed, 2 insertions(+), 0 deletions(-)
8
9 diff --git a/plugin/Makefile.am b/plugin/Makefile.am
10 index 93284cc..dde76a9 100644
11 --- a/plugin/Makefile.am
12 +++ b/plugin/Makefile.am
13 @@ -3,6 +3,8 @@ if ENABLE_PLUGIN
14 plugindir = $(libdir)/mozilla/plugins
15 plugin_LTLIBRARIES = virt-viewer-plugin.la
16
17 +gladedir = $(pkgdatadir)/ui
18 +
19 virt_viewer_plugin_la_SOURCES = \
20 ../src/util.c ../src/util.h \
21 ../src/auth.c ../src/auth.h \
22 --
+0
-81
debian/patches/0003-Add-some-docs.patch less more
0 From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
1 Date: Tue, 2 Feb 2010 20:59:10 +0100
2 Subject: Add some docs
3
4 ---
5 plugin/README | 40 ++++++++++++++++++++++++++++++++++++++++
6 plugin/test.html | 17 +++++++++++++++++
7 2 files changed, 57 insertions(+), 0 deletions(-)
8 create mode 100644 plugin/README
9 create mode 100644 plugin/test.html
10
11 diff --git a/plugin/README b/plugin/README
12 new file mode 100644
13 index 0000000..dea7b78
14 --- /dev/null
15 +++ b/plugin/README
16 @@ -0,0 +1,40 @@
17 +Testing
18 +-------
19 +
20 +Restart your browser. In the location bar, type:
21 +
22 + about:plugins
23 +
24 +Amongst your other plugins you should see the virt-viewer plugin:
25 +
26 + Virt-viewer browser plugin
27 +
28 + File name: virt-viewer-plugin.so
29 + Virtual machine console viewer plugin
30 +
31 + MIME Type Description Suffixes Enabled
32 + application/x-virt-viewer Virt viewer virt-viewer Yes
33 +
34 +If that appears, then next edit the test.html page in the current
35 +directory. You will need to change the name of this page to point
36 +to a virtual machine.
37 +
38 +Then load the edited 'test.html' page into your browser, and you should see a
39 +virt-viewer widget and the display of the virtual machine.
40 +
41 +SECURITY
42 +--------
43 +
44 +If you install this plugin, then any web page could invoke it.
45 +
46 +Specific security implications of this are:
47 +
48 +(1) Malicious web page could cause your browser to connect to an arbitrary
49 +virtual machine even addresses behind a firewall. If you allow the plugin to be
50 +controlled by Javascript, and to communicate back success/failure indications,
51 +then this would allow a hacker to probe ports which they might otherwise not
52 +have access to.
53 +
54 +(2) A web page could connect to a malicious virtual machine. The virt-viewer
55 +widget is not hardened against responses from malicious VNC servers which might
56 +provide faulty responses, causing virt-viewer to crash or be subverted.
57 diff --git a/plugin/test.html b/plugin/test.html
58 new file mode 100644
59 index 0000000..33d333f
60 --- /dev/null
61 +++ b/plugin/test.html
62 @@ -0,0 +1,17 @@
63 +<html>
64 +<body>
65 +
66 + <h1>Virt-viewer applet test</h1>
67 +
68 + <p>You will need to edit the source to
69 + set <code>uri</code>, <code>name</code> etc.</p>
70 +
71 + <embed type="application/x-virt-viewer"
72 + width="800" height="600"
73 + uri="qemu:///system" name="test1">
74 + </embed>
75 +
76 + <p>End of page</p>
77 +
78 +</body>
79 +</html>
80 --
+0
-3
debian/patches/series less more
0 0001-Fix-build-with-xulrunner-1.9.1.patch
1 0002-Define-GLADE_DIR.patch
2 0003-Add-some-docs.patch
00 #!/usr/bin/make -f
11
22 LDFLAGS += "-Wl,--as-needed"
3
3
44 include /usr/share/cdbs/1/rules/debhelper.mk
55 include /usr/share/cdbs/1/class/autotools.mk
6 include /usr/share/cdbs/1/rules/patchsys-quilt.mk
7
8 DEB_CONFIGURE_EXTRA_FLAGS += --enable-plugin=yes
9 DEB_DH_MAKESHLIBS_ARGS_mozilla-virt-viewer += --noscripts -X /plugins/
10
11 clean::
12 rm -f $(CURDIR)/aclocal.m4
13 rm -f $(CURDIR)/config.h.in
14 rm -f $(CURDIR)/configure
15 rm -f $(CURDIR)/Makefile.in
16 rm -f $(CURDIR)/man/Makefile.in
17 rm -f $(CURDIR)/man/virt-viewer.1
18 rm -f $(CURDIR)/plugin/Makefile.in
19 rm -f $(CURDIR)/src/Makefile.in
20
21 post-patches::
22 autoreconf -i
+0
-3
debian/virt-viewer.install less more
0 usr/bin/
1 usr/share/man/
2 usr/share/virt-viewer/