Anonymous | Login | Signup for a new account | 11-10-2008 11:13 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001302 | [BusyBox] Other | minor | always | 04-05-07 00:55 | 06-16-07 16:24 | ||||
Reporter | Michael Tokarev | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 1.4.x | ||||||
Summary | 0001302: busybox prefers internal applets even if !STANDALONE_SHELL | ||||||||
Description |
Since about 1.4.0, busybox prefers internal applets even if not configured to do so. This results in not-so-fun stuff like: $ busybox ash $ chmod --reference=x y chmod: unrecognized option `--reference=x' BusyBox v1.4.1 (2007-02-14 14:22:15 MSK) multi-call binary No help available. $ /bin/chmod --reference=x y $ (this one works) I looked into sources, and see that usage of tryexec() in shell/ash.c is quite messed up (up to 1.4.2) - it has been partially rewritten/reorganized. And I don't quite understand what it supposed to work like in the first place. Speaking of this 'prefer internal applets' thing, I wonder if we can do two things. First, how about searching the executable normally, and stat()'ing the found file to see if it's our executable - if yes, we can safely fork() our own process, and not execute anything. And IF not found in $PATH, try to search our applet list. I.e., something in the middle of STANDALONE_SHELL and !STANDALONE_SHELL. And second, how about marking whenever a given applet is "safe" in the applet list, and not in ash? So that other shells (by the way, why there are so many of them??) will benefit. Note that the list in ash.c is far from complete - there are many more "safe" applets than that. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Copyright © 2000 - 2006 Mantis Group |