scan_proc_pids() of the fuser applet assumes that the working
directory is /proc when it is invoked. in the current version of
busybox this isn't the case and fuser fails if the working directory
is different from /proc. this patch adds a chdir("/proc") at the
beginning of scan_proc_pids()

-- 
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona

       The yellow ships hung in the air just like bricks dont do
                 (The Hitch-Hiker's Guide to the Galaxy)
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-
--- busybox-1.10.2.org/procps/fuser.c	2008-04-19 06:03:13.000000000 +0200
+++ busybox-1.10.2/procps/fuser.c	2008-10-01 12:27:12.000000000 +0200
@@ -215,6 +215,9 @@
 	pid_t pid;
 	pid_list *plist;
 
+	if (chdir("/proc") < 0)
+		return NULL;
+
 	d = opendir(".");
 	if (!d)
 		return NULL;
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to