[bug] [patch] fuser.c:
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Wed May 28 13:31:26 UTC 2008
On Wed, 28 May 2008, Denys Vlasenko wrote:
> On Wednesday 28 May 2008 10:42, Cristian Ionescu-Idbohrn wrote:
> > Need to move to "/proc" before opening ".".
>
> Good catch!
:)
Your patch differs from mine. Relevant hunk:
@@ -215,7 +216,7 @@
pid_t pid;
pid_list *plist;
- d = opendir(".");
+ d = opendir("/proc");
if (!d)
return NULL;
Are we absolutely sure that CWD _is_ /proc at the point where:
+ d = opendir("/proc");
? 9 lines down in the code we're doing this:
if (chdir(de->d_name) < 0)
continue;
and that will not always do TRT, unless CWD _is_ /proc from the
beginning.
Cheers,
--
Cristian
More information about the busybox
mailing list