gnome-help-browser and gnome-download
- From: Grant McLean <Grant McLean davy ie>
- To: "'gnome-devel-list gnome org'" <gnome-devel-list gnome org>
- Subject: gnome-help-browser and gnome-download
- Date: Fri, 14 Jun 2002 14:45:43 +0100
Hi all
As a GNOME user and a Perl hacker, I thought I'd try my hand at
extending the gnome-help-browser to handle 'perldoc:...' URLs.
Given that ...
a) gnome-help-browser calls gnome-download and
b) gnome-download is already a Perl script
... this seemed like the obvious place to start. However before
that would work, I had to stretch my C skills to the max to come
up with this patch for gnome-core/help-browser/transport.c:
===================== cut =======================
*** transport.c-orig Fri Jun 14 14:09:28 2002
--- transport.c Mon Jun 10 15:06:48 2002
***************
*** 218,234 ****
transportUnknown( docObj obj )
{
int sock;
DecomposedUrl url;
gchar key[BUFSIZ];
FILE *pipe;
gint res;
! return -1;
statusMsg("Calling external download...");
url = docObjGetDecomposedUrl(obj);
g_snprintf(key, sizeof key, "gnome-download '%s'",
docObjGetAbsoluteRef(obj));
g_message ("key is: %s", key);
pipe = popen(key, "r");
sock = fileno(pipe);
res = loadSock(obj, sock);
--- 218,234 ----
transportUnknown( docObj obj )
{
int sock;
DecomposedUrl url;
gchar key[BUFSIZ];
FILE *pipe;
gint res;
! /* return -1; */
statusMsg("Calling external download...");
url = docObjGetDecomposedUrl(obj);
g_snprintf(key, sizeof key, "gnome-download '%s'",
docObjGetAbsoluteRef(obj));
g_message ("key is: %s", key);
pipe = popen(key, "r");
sock = fileno(pipe);
res = loadSock(obj, sock);
===================== cut =======================
Now, my question is - why was the return added in the first place?
My guess is that it was as a result of security concerns. If I'm
correct, the first thing I'd need to do is come up with a secure
way for gnome-help-browser to call gnome-download.
Any thoughts anyone?
Regards
Grant
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:helpdesk davy ie and delete this e-mail from your system.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]