logger: fix a problem of losing all argv except first
[oweals/busybox.git] / debianutils / which.c
index 79b2a4f830c76cbf5a55562be0be207699dc5123..b556a9fd96392f5f5c96a691909b91405295be98 100644 (file)
@@ -10,8 +10,9 @@
  * Based on which from debianutils
  */
 
-#include "busybox.h"
+#include "libbb.h"
 
+int which_main(int argc, char **argv);
 int which_main(int argc, char **argv)
 {
        int status = EXIT_SUCCESS;
@@ -21,9 +22,11 @@ int which_main(int argc, char **argv)
                bb_show_usage();
        }
 
+/* We shouldn't do this. Ever. Not our business.
        if (!getenv("PATH")) {
-               setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin", 1);
+               putenv((char*)bb_PATH_root_path);
        }
+*/
 
        while (--argc > 0) {
                argv++;