Your message dated Mon, 18 Sep 2006 01:39:22 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bug fixed: no check for /proc/bus/usb/devices causes segfault
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gnome-pilot
Version: 2.0.10-3

if gpilotd is started and '/proc/bus/usb/devices' doesn't exist, gpilotd will segfault. The 'devices' file may not exist if the usbfs is not mounted or if the usb host controller module is not inserted.

here is a patch, I'm using g_warning to notify since g_error causes an ugly abort message. I don't know if this is the right thing to do since if you start it thru that little gpilot-applet, you probably won't ever see the messages unless you looked for them. Maybe this is ok though.

-Shane


diff -urN gnome-pilot-2.0.10.orig/gpilotd/gpilotd.c gnome-pilot-2.0.10/gpilotd/gpilotd.c
--- gnome-pilot-2.0.10.orig/gpilotd/gpilotd.c	2003-07-17 23:57:41.000000000 -0400
+++ gnome-pilot-2.0.10/gpilotd/gpilotd.c	2004-02-19 22:31:27.000000000 -0500
@@ -845,6 +845,7 @@
 	gboolean visor_exists = FALSE, visor_net = TRUE;
 	char line[256]; /* this is more than enough to fit any line from 
 			 * /proc/bus/usb/devices */
+	char usbpath[] = "/proc/bus/usb/devices";
 
 	FILE *f;
 
@@ -854,7 +855,11 @@
 		return FALSE;
 
 	/* Check /proc/bus/usb/devices for a usb device */
-	f = fopen ("/proc/bus/usb/devices", "r");
+	f = fopen (usbpath, "r");
+	if(f == NULL) {
+		g_warning("%s: %s\n", usbpath, strerror(errno));
+		return FALSE;
+	}
 	
 	while (fgets (line, 255, f) != NULL && !visor_exists) {
 		if (line[0] != 'P')

--- End Message ---
--- Begin Message ---
Version: 2.0.12-1

Hi,

While going through open bugs of gnome-pilot I found this bug which
already is fixed in version 2.0.12 of gnome-pilot, so I am closing the
bug. Gnome-pilot handles a missing /proc/bus/usb/devices file just fine
know.

/* Check /proc/bus/usb/devices for a usb device */
        f = fopen ("/proc/bus/usb/devices", "r");
        if (!f)
                f = fopen ("/proc/bus/usb/devices_please-use-sysfs-instead", 
"r");
        if (!f)
                return TRUE;


Greetings Arjan 

Attachment: signature.asc
Description: Dit berichtdeel is digitaal ondertekend


--- End Message ---

Reply via email to