[BusyBox] Some problems with busybox-1.0.0-pre1
Vladimir N. Oleynik
dzo at simtreas.ru
Wed Jul 30 15:43:10 UTC 2003
I wrote:
>> An other problem I found is that
>> for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
>> echo 1 > $f
>> done
> Heh. I know solution for this problem.
> I send my patch to Herbert Hu. He answer one day. Please wait he agreed
Forward from Herber Hu:
>I have already patched for ash.0.3.X
>
> i = glob(p, GLOB_NOMAGIC, 0, &pglob);
> .....
> switch (i) {
> case 0:
> if (!(pglob.gl_flags & GLOB_MAGCHAR))
> goto nometa2;
>
> to
> i = glob(p, 0, 0, &pglob);
> ............
> switch (i) {
> case 0:
> if (pglob.gl_pathv[1] == 0 && !strcmp(p,
> pglob.gl_pathv[0]))
> goto nometa2;
>
>
> This idea is good?
No, glob(3) is broken in glibc.
See http://bugs.debian.org/67921
* End forward *
Hmm.
This problem also presend from uclibc.
But, my variant
--- busybox.orig/shell/ash.c 2003-07-30 19:37:12.000000000 +0400
+++ busybox/shell/ash.c 2003-07-30 18:42:23.000000000 +0400
@@ -5601,14 +5601,11 @@
ckfree(p);
switch (i) {
case 0:
- if (!(pglob.gl_flags & GLOB_MAGCHAR))
- goto nometa2;
addglob(&pglob);
globfree(&pglob);
INTON;
break;
case GLOB_NOMATCH:
-nometa2:
globfree(&pglob);
INTON;
nometa:
reduced more problem if dir/file havn`t specialy "*" char.
--w
vodz
More information about the busybox
mailing list