|
|
@@ -1,10 +1,10 @@
|
|
|
-Index: busybox-1.4.2/editors/awk.c
|
|
|
+Index: busybox-1.7.2/editors/awk.c
|
|
|
===================================================================
|
|
|
---- busybox-1.4.2.orig/editors/awk.c 2007-06-04 13:21:35.202625056 +0200
|
|
|
-+++ busybox-1.4.2/editors/awk.c 2007-06-04 13:21:37.927210856 +0200
|
|
|
-@@ -30,6 +30,11 @@
|
|
|
+--- busybox-1.7.2.orig/editors/awk.c 2007-10-05 01:39:50.073293533 +0200
|
|
|
++++ busybox-1.7.2/editors/awk.c 2007-10-05 02:16:42.539374788 +0200
|
|
|
+@@ -33,6 +33,11 @@
|
|
|
/* these flags are static, don't change them when value is changed */
|
|
|
- #define VF_DONTTOUCH (VF_ARRAY | VF_SPECIAL | VF_WALK | VF_CHILD | VF_DIRTY)
|
|
|
+ #define VF_DONTTOUCH (VF_ARRAY | VF_SPECIAL | VF_WALK | VF_CHILD | VF_DIRTY)
|
|
|
|
|
|
+#ifdef CONFIG_AWX
|
|
|
+#define fputs(s, stream) fputs_hook(s, stream)
|
|
|
@@ -13,15 +13,14 @@ Index: busybox-1.4.2/editors/awk.c
|
|
|
+
|
|
|
/* Variable */
|
|
|
typedef struct var_s {
|
|
|
- unsigned short type; /* flags */
|
|
|
-@@ -50,10 +55,15 @@
|
|
|
- char *programname;
|
|
|
+ unsigned type; /* flags */
|
|
|
+@@ -54,9 +59,14 @@
|
|
|
} chain;
|
|
|
|
|
|
-+typedef var *(*awk_cfunc)(var *res, var *args, int nargs);
|
|
|
/* Function */
|
|
|
++typedef var *(*awk_cfunc)(var *res, var *args, int nargs);
|
|
|
typedef struct func_s {
|
|
|
- unsigned short nargs;
|
|
|
+ unsigned nargs;
|
|
|
- struct chain_s body;
|
|
|
+ enum { AWKFUNC, CFUNC } type;
|
|
|
+ union {
|
|
|
@@ -31,17 +30,17 @@ Index: busybox-1.4.2/editors/awk.c
|
|
|
} func;
|
|
|
|
|
|
/* I/O stream */
|
|
|
-@@ -1312,7 +1322,8 @@
|
|
|
+@@ -1400,7 +1410,8 @@
|
|
|
next_token(TC_FUNCTION);
|
|
|
- pos++;
|
|
|
- f = newfunc(t.string);
|
|
|
+ g_pos++;
|
|
|
+ f = newfunc(t_string);
|
|
|
- f->body.first = NULL;
|
|
|
+ f->type = AWKFUNC;
|
|
|
+ f->x.body.first = NULL;
|
|
|
f->nargs = 0;
|
|
|
while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
|
|
|
- v = findvar(ahash, t.string);
|
|
|
-@@ -1321,7 +1332,7 @@
|
|
|
+ v = findvar(ahash, t_string);
|
|
|
+@@ -1409,7 +1420,7 @@
|
|
|
if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
|
|
|
break;
|
|
|
}
|
|
|
@@ -50,33 +49,34 @@ Index: busybox-1.4.2/editors/awk.c
|
|
|
chain_group();
|
|
|
clear_array(ahash);
|
|
|
|
|
|
-@@ -2260,7 +2271,8 @@
|
|
|
+@@ -2372,7 +2383,8 @@
|
|
|
break;
|
|
|
|
|
|
case XC( OC_FUNC ):
|
|
|
-- if (! op->r.f->body.first)
|
|
|
+- if (!op->r.f->body.first)
|
|
|
+ if ((op->r.f->type == AWKFUNC) &&
|
|
|
+ !op->r.f->x.body.first)
|
|
|
- runtime_error(EMSG_UNDEF_FUNC);
|
|
|
+ syntax_error(EMSG_UNDEF_FUNC);
|
|
|
|
|
|
X.v = R.v = nvalloc(op->r.f->nargs+1);
|
|
|
-@@ -2277,7 +2289,11 @@
|
|
|
+@@ -2389,7 +2401,10 @@
|
|
|
fnargs = X.v;
|
|
|
|
|
|
- L.s = programname;
|
|
|
+ L.s = g_progname;
|
|
|
- res = evaluate(op->r.f->body.first, res);
|
|
|
+ if (op->r.f->type == AWKFUNC)
|
|
|
+ res = evaluate(op->r.f->x.body.first, res);
|
|
|
+ else if (op->r.f->type == CFUNC)
|
|
|
+ res = op->r.f->x.cfunc(res, fnargs, op->r.f->nargs);
|
|
|
-+
|
|
|
- programname = L.s;
|
|
|
+ g_progname = L.s;
|
|
|
|
|
|
nvfree(fnargs);
|
|
|
-@@ -2637,6 +2653,11 @@
|
|
|
- return &rsm;
|
|
|
+@@ -2753,6 +2768,13 @@
|
|
|
}
|
|
|
|
|
|
+ int awk_main(int argc, char **argv);
|
|
|
++int awx_main(int argc, char **argv);
|
|
|
++
|
|
|
+#ifdef CONFIG_AWX
|
|
|
+static int is_awx = 0;
|
|
|
+#include "awx.c"
|
|
|
@@ -84,23 +84,24 @@ Index: busybox-1.4.2/editors/awk.c
|
|
|
+
|
|
|
int awk_main(int argc, char **argv)
|
|
|
{
|
|
|
- int i, j, flen;
|
|
|
-@@ -2693,6 +2714,10 @@
|
|
|
- free(s);
|
|
|
+ unsigned opt;
|
|
|
+@@ -2817,6 +2839,11 @@
|
|
|
+ *s1 = '=';
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
++
|
|
|
+#ifdef CONFIG_AWX
|
|
|
+ do_awx(argc, argv);
|
|
|
+#endif
|
|
|
+
|
|
|
- programname = NULL;
|
|
|
- while((c = getopt(argc, argv, "F:v:f:W:")) != EOF) {
|
|
|
- switch (c) {
|
|
|
-Index: busybox-1.4.2/editors/awx.c
|
|
|
+ opt_complementary = "v::f::";
|
|
|
+ opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &opt_f, &opt_W);
|
|
|
+ argv += optind;
|
|
|
+Index: busybox-1.7.2/editors/awx.c
|
|
|
===================================================================
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
-+++ busybox-1.4.2/editors/awx.c 2007-06-04 13:21:37.928210704 +0200
|
|
|
-@@ -0,0 +1,633 @@
|
|
|
++++ busybox-1.7.2/editors/awx.c 2007-10-05 02:10:16.393369582 +0200
|
|
|
+@@ -0,0 +1,636 @@
|
|
|
+/*
|
|
|
+ * awk web extension
|
|
|
+ *
|
|
|
@@ -126,7 +127,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+static int lang_inuse = 0;
|
|
|
+
|
|
|
+/* look up a translation symbol from the hash */
|
|
|
-+static inline char *translate_lookup(char *str)
|
|
|
++static inline const char *translate_lookup(char *str)
|
|
|
+{
|
|
|
+ char *name, *def, *p;
|
|
|
+ hash_item *hi;
|
|
|
@@ -151,7 +152,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+/* look for translation markers in the line and return the translated string */
|
|
|
+static char *translate_line(char *line)
|
|
|
+{
|
|
|
-+ char *tok[MAX_TR * 3];
|
|
|
++ const char *tok[MAX_TR * 3];
|
|
|
+ char *l, *p, *p2 = NULL, *res;
|
|
|
+ int len = 0, _pos = 0, i, tr_abort = 0;
|
|
|
+ static char *backlog = NULL;
|
|
|
@@ -283,7 +284,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+{
|
|
|
+ const char *langfmt = "/usr/lib/webif/lang/%s.txt";
|
|
|
+ char lbuf[LINE_BUF];
|
|
|
-+ char *lang;
|
|
|
++ const char *lang;
|
|
|
+
|
|
|
+ if (!lang_inuse)
|
|
|
+ init_lang(res, args, nargs);
|
|
|
@@ -299,7 +300,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+}
|
|
|
+
|
|
|
+/* read the contents of an entire file */
|
|
|
-+static char *get_file(char *fname)
|
|
|
++static char *get_file(const char *fname)
|
|
|
+{
|
|
|
+ FILE *F;
|
|
|
+ char *s = NULL;
|
|
|
@@ -343,8 +344,8 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+
|
|
|
+ tv = nvalloc(1);
|
|
|
+ memset(&tmp, 0, sizeof(tmp));
|
|
|
-+ pos = p;
|
|
|
-+ t.lineno = 1;
|
|
|
++ g_pos = p;
|
|
|
++ t_lineno = 1;
|
|
|
+ while ((tclass = next_token(TC_EOF | TC_OPSEQ |
|
|
|
+ TC_OPTERM | TC_BEGIN | TC_FUNCDECL)) != TC_EOF) {
|
|
|
+ if (tclass & TC_OPTERM)
|
|
|
@@ -357,13 +358,13 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+ chain_group();
|
|
|
+ } else if (tclass & TC_FUNCDECL) {
|
|
|
+ next_token(TC_FUNCTION);
|
|
|
-+ pos++;
|
|
|
-+ f = newfunc(t.string);
|
|
|
++ g_pos++;
|
|
|
++ f = newfunc(t_string);
|
|
|
+ f->type = AWKFUNC;
|
|
|
+ f->x.body.first = NULL;
|
|
|
+ f->nargs = 0;
|
|
|
+ while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
|
|
|
-+ v = findvar(ahash, t.string);
|
|
|
++ v = findvar(ahash, t_string);
|
|
|
+ v->x.aidx = (f->nargs)++;
|
|
|
+
|
|
|
+ if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
|
|
|
@@ -382,10 +383,12 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+
|
|
|
+/* include an awk file and run its BEGIN{} section */
|
|
|
+static xhash *includes = NULL;
|
|
|
-+static void include_file(char *filename)
|
|
|
++static void include_file(const char *filename)
|
|
|
+{
|
|
|
+ char *s;
|
|
|
+ var *v;
|
|
|
++ int oldlnr = g_lineno;
|
|
|
++ const char *oldprg = g_progname;
|
|
|
+
|
|
|
+ if (!includes)
|
|
|
+ includes = hash_init();
|
|
|
@@ -402,13 +405,17 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+ fprintf(stderr, "Could not open file.\n");
|
|
|
+ return;
|
|
|
+ }
|
|
|
++ g_lineno = 1;
|
|
|
++ g_progname = xstrdup(filename);
|
|
|
+ parse_include(s+1);
|
|
|
+ free(s);
|
|
|
++ g_lineno = oldlnr;
|
|
|
++ g_progname = oldprg;
|
|
|
+}
|
|
|
+
|
|
|
+static var *include(var *res, var *args, int nargs)
|
|
|
+{
|
|
|
-+ char *s;
|
|
|
++ const char *s;
|
|
|
+
|
|
|
+ s = getvar_s(args);
|
|
|
+ if (s && (strlen(s) > 0))
|
|
|
@@ -424,7 +431,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+ node *n;
|
|
|
+
|
|
|
+ memset(&body, 0, sizeof(body));
|
|
|
-+ pos = str;
|
|
|
++ g_pos = str;
|
|
|
+ seq = &body;
|
|
|
+
|
|
|
+ /* end of expression, assume that there's going to be a free byte
|
|
|
@@ -456,7 +463,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+
|
|
|
+ if (!e || !e->var)
|
|
|
+ return;
|
|
|
-+ lineno = e->line;
|
|
|
++ g_lineno = e->line;
|
|
|
+ switch (e->t) {
|
|
|
+ case T_TEXT:
|
|
|
+ s = malloc(strlen(e->var) + 2);
|
|
|
@@ -502,38 +509,36 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+}
|
|
|
+
|
|
|
+/* awk method render(), which opens a template file and processes all awk ssi calls */
|
|
|
-+static void render_file(char *filename)
|
|
|
++static void render_file(const char *filename)
|
|
|
+{
|
|
|
+ struct template_cb tcb;
|
|
|
+ struct template_element *e;
|
|
|
+ FILE *f;
|
|
|
-+ char *oldprg;
|
|
|
-+ int oldlnr;
|
|
|
++ const char *oldprg = g_progname;
|
|
|
++ int oldlnr = g_lineno;
|
|
|
+
|
|
|
+ if (!filename)
|
|
|
+ return;
|
|
|
+
|
|
|
-+ oldlnr = lineno;
|
|
|
-+ oldprg = programname;
|
|
|
-+ programname = filename;
|
|
|
-+
|
|
|
+ f = fopen(filename, "r");
|
|
|
+ if (!f)
|
|
|
+ return;
|
|
|
+
|
|
|
++ g_progname = xstrdup(filename);
|
|
|
++ g_lineno = 1;
|
|
|
+ memset(&tcb, 0, sizeof(tcb));
|
|
|
+ tcb.handle_element = render_element;
|
|
|
+ e = parse_template(&tcb, f);
|
|
|
+ execute_template(&tcb, e);
|
|
|
+ free_template(&tcb, e);
|
|
|
+ fclose(f);
|
|
|
-+ programname = oldprg;
|
|
|
-+ lineno = oldlnr;
|
|
|
++ g_progname = oldprg;
|
|
|
++ g_lineno = oldlnr;
|
|
|
+}
|
|
|
+
|
|
|
+static var *render(var *res, var *args, int nargs)
|
|
|
+{
|
|
|
-+ char *s;
|
|
|
++ const char *s;
|
|
|
+
|
|
|
+ s = getvar_s(args);
|
|
|
+ if (!s)
|
|
|
@@ -555,7 +560,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+}
|
|
|
+
|
|
|
+/* registers a global c function for the awk interpreter */
|
|
|
-+static void register_cfunc(char *name, awk_cfunc cfunc, int nargs)
|
|
|
++static void register_cfunc(const char *name, awk_cfunc cfunc, int nargs)
|
|
|
+{
|
|
|
+ func *f;
|
|
|
+
|
|
|
@@ -573,7 +578,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+ setvar_u(findvar(formvar, name), value);
|
|
|
+}
|
|
|
+
|
|
|
-+static char *cgi_getvar(char *name)
|
|
|
++static const char *cgi_getvar(const char *name)
|
|
|
+{
|
|
|
+ if (!formvar) {
|
|
|
+ formvar = hash_init();
|
|
|
@@ -589,8 +594,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+/* function call for accessing cgi form variables */
|
|
|
+static var *getvar(var *res, var *args, int nargs)
|
|
|
+{
|
|
|
-+ char *s;
|
|
|
-+ char *svar;
|
|
|
++ const char *s, *svar;
|
|
|
+
|
|
|
+ s = getvar_s(args);
|
|
|
+ if (!s)
|
|
|
@@ -608,7 +612,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+/* call an awk function without arguments by string reference */
|
|
|
+static var *call(var *res, var *args, int nargs)
|
|
|
+{
|
|
|
-+ char *s = getvar_s(args);
|
|
|
++ const char *s = getvar_s(args);
|
|
|
+ func *f;
|
|
|
+
|
|
|
+ if (!s)
|
|
|
@@ -629,10 +633,10 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+ char *tmp, *s = NULL;
|
|
|
+
|
|
|
+ zero_out_var(&tv);
|
|
|
-+ programname = name;
|
|
|
++ g_progname = name;
|
|
|
+
|
|
|
+ /* read the main controller source */
|
|
|
-+ s = get_file(programname);
|
|
|
++ s = get_file(g_progname);
|
|
|
+ if (!s) {
|
|
|
+ fprintf(stderr, "Could not open file\n");
|
|
|
+ return 1;
|
|
|
@@ -650,7 +654,7 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+
|
|
|
+ action = newvar("ACTION");
|
|
|
+ if (!(strlen(getvar_s(action)) > 0)) {
|
|
|
-+ tmp = cgi_getvar("action");
|
|
|
++ tmp = (char *) cgi_getvar("action");
|
|
|
+ if (!tmp || (strlen(tmp) <= 0))
|
|
|
+ tmp = strdup("default");
|
|
|
+
|
|
|
@@ -694,21 +698,21 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ /* fill in ARGV array */
|
|
|
-+ setvar_i(V[ARGC], argc + 1);
|
|
|
-+ setari_u(V[ARGV], 0, "awx");
|
|
|
++ setvar_i(intvar[ARGC], argc + 1);
|
|
|
++ setari_u(intvar[ARGV], 0, "awx");
|
|
|
+ i = 0;
|
|
|
+ while (*args)
|
|
|
-+ setari_u(V[ARGV], ++i, *args++);
|
|
|
++ setari_u(intvar[ARGV], ++i, *args++);
|
|
|
+
|
|
|
+ while((c = getopt(argc, argv, "i:f:")) != EOF) {
|
|
|
+ switch(c) {
|
|
|
+ case 'i':
|
|
|
-+ programname = optarg;
|
|
|
++ g_progname = optarg;
|
|
|
+ include_file(optarg);
|
|
|
+ break;
|
|
|
+ case 'f':
|
|
|
+ ret = 0;
|
|
|
-+ programname = optarg;
|
|
|
++ g_progname = optarg;
|
|
|
+ render_file(optarg);
|
|
|
+ goto done;
|
|
|
+ }
|
|
|
@@ -734,10 +738,10 @@ Index: busybox-1.4.2/editors/awx.c
|
|
|
+ return awk_main(argc, argv);
|
|
|
+}
|
|
|
+
|
|
|
-Index: busybox-1.4.2/editors/awx_parser.h
|
|
|
+Index: busybox-1.7.2/editors/awx_parser.h
|
|
|
===================================================================
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
-+++ busybox-1.4.2/editors/awx_parser.h 2007-06-04 13:21:37.928210704 +0200
|
|
|
++++ busybox-1.7.2/editors/awx_parser.h 2007-10-05 01:43:59.487506840 +0200
|
|
|
@@ -0,0 +1,38 @@
|
|
|
+#ifndef __TEMPLATE_PARSER_H
|
|
|
+#define __TEMPLATE_PARSER_H
|
|
|
@@ -777,10 +781,10 @@ Index: busybox-1.4.2/editors/awx_parser.h
|
|
|
+void free_template(struct template_cb *cb, struct template_element *e);
|
|
|
+
|
|
|
+#endif
|
|
|
-Index: busybox-1.4.2/editors/awx_parser.l
|
|
|
+Index: busybox-1.7.2/editors/awx_parser.l
|
|
|
===================================================================
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
-+++ busybox-1.4.2/editors/awx_parser.l 2007-06-04 13:21:37.929210552 +0200
|
|
|
++++ busybox-1.7.2/editors/awx_parser.l 2007-10-05 01:43:59.547510259 +0200
|
|
|
@@ -0,0 +1,302 @@
|
|
|
+%{
|
|
|
+#include <stdio.h>
|
|
|
@@ -1084,10 +1088,10 @@ Index: busybox-1.4.2/editors/awx_parser.l
|
|
|
+ free(e);
|
|
|
+ return free_template(cb, next);
|
|
|
+}
|
|
|
-Index: busybox-1.4.2/editors/Config.in
|
|
|
+Index: busybox-1.7.2/editors/Config.in
|
|
|
===================================================================
|
|
|
---- busybox-1.4.2.orig/editors/Config.in 2007-06-04 13:21:31.486190040 +0200
|
|
|
-+++ busybox-1.4.2/editors/Config.in 2007-06-04 13:21:37.929210552 +0200
|
|
|
+--- busybox-1.7.2.orig/editors/Config.in 2007-10-05 01:39:50.097294897 +0200
|
|
|
++++ busybox-1.7.2/editors/Config.in 2007-10-05 01:43:59.583512308 +0200
|
|
|
@@ -12,6 +12,13 @@
|
|
|
Awk is used as a pattern scanning and processing language. This is
|
|
|
the BusyBox implementation of that programming language.
|
|
|
@@ -1102,11 +1106,11 @@ Index: busybox-1.4.2/editors/Config.in
|
|
|
config FEATURE_AWK_MATH
|
|
|
bool "Enable math functions (requires libm)"
|
|
|
default y
|
|
|
-Index: busybox-1.4.2/editors/Kbuild
|
|
|
+Index: busybox-1.7.2/editors/Kbuild
|
|
|
===================================================================
|
|
|
---- busybox-1.4.2.orig/editors/Kbuild 2007-06-04 13:21:31.492189128 +0200
|
|
|
-+++ busybox-1.4.2/editors/Kbuild 2007-06-04 13:21:37.929210552 +0200
|
|
|
-@@ -10,3 +10,12 @@
|
|
|
+--- busybox-1.7.2.orig/editors/Kbuild 2007-10-05 01:39:50.105295361 +0200
|
|
|
++++ busybox-1.7.2/editors/Kbuild 2007-10-05 01:43:59.627514818 +0200
|
|
|
+@@ -12,3 +12,12 @@
|
|
|
lib-$(CONFIG_PATCH) += patch.o
|
|
|
lib-$(CONFIG_SED) += sed.o
|
|
|
lib-$(CONFIG_VI) += vi.o
|
|
|
@@ -1119,22 +1123,22 @@ Index: busybox-1.4.2/editors/Kbuild
|
|
|
+editors/awx_parser.o: editors/awx_parser.c FORCE
|
|
|
+ $(call cmd,force_checksrc)
|
|
|
+ $(call if_changed_rule,cc_o_c)
|
|
|
-Index: busybox-1.4.2/include/applets.h
|
|
|
+Index: busybox-1.7.2/include/applets.h
|
|
|
===================================================================
|
|
|
---- busybox-1.4.2.orig/include/applets.h 2007-06-04 13:21:36.732392496 +0200
|
|
|
-+++ busybox-1.4.2/include/applets.h 2007-06-04 13:21:37.929210552 +0200
|
|
|
-@@ -60,6 +60,7 @@
|
|
|
+--- busybox-1.7.2.orig/include/applets.h 2007-10-05 01:43:59.203490652 +0200
|
|
|
++++ busybox-1.7.2/include/applets.h 2007-10-05 01:43:59.647515958 +0200
|
|
|
+@@ -76,6 +76,7 @@
|
|
|
USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
|
|
USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER))
|
|
|
- USE_AWK(APPLET(awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
|
|
+ USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
|
|
|
+USE_AWX(APPLET_NOUSAGE(awx, awx, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
|
|
- USE_BASENAME(APPLET(basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
|
|
|
+ USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
|
|
|
USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
|
|
|
//USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
|
|
|
-Index: busybox-1.4.2/include/cgi.h
|
|
|
+Index: busybox-1.7.2/include/cgi.h
|
|
|
===================================================================
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
-+++ busybox-1.4.2/include/cgi.h 2007-06-04 13:21:37.929210552 +0200
|
|
|
++++ busybox-1.7.2/include/cgi.h 2007-10-05 01:43:59.667517098 +0200
|
|
|
@@ -0,0 +1,8 @@
|
|
|
+#ifndef CGI_H
|
|
|
+#define CGI_H
|
|
|
@@ -1144,10 +1148,10 @@ Index: busybox-1.4.2/include/cgi.h
|
|
|
+int cgi_init(var_handler);
|
|
|
+
|
|
|
+#endif
|
|
|
-Index: busybox-1.4.2/libbb/cgi.c
|
|
|
+Index: busybox-1.7.2/libbb/cgi.c
|
|
|
===================================================================
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
-+++ busybox-1.4.2/libbb/cgi.c 2007-06-04 13:21:37.930210400 +0200
|
|
|
++++ busybox-1.7.2/libbb/cgi.c 2007-10-05 01:43:59.707519378 +0200
|
|
|
@@ -0,0 +1,457 @@
|
|
|
+/* --------------------------------------------------------------------------
|
|
|
+ * functions for processing cgi form data
|
|
|
@@ -1606,14 +1610,15 @@ Index: busybox-1.4.2/libbb/cgi.c
|
|
|
+
|
|
|
+ return retval;
|
|
|
+}
|
|
|
-Index: busybox-1.4.2/libbb/Kbuild
|
|
|
+Index: busybox-1.7.2/libbb/Kbuild
|
|
|
===================================================================
|
|
|
---- busybox-1.4.2.orig/libbb/Kbuild 2007-06-04 13:21:37.710243840 +0200
|
|
|
-+++ busybox-1.4.2/libbb/Kbuild 2007-06-04 13:21:37.930210400 +0200
|
|
|
-@@ -118,3 +118,6 @@
|
|
|
- lib-$(CONFIG_MDEV) += xregcomp.o
|
|
|
- lib-$(CONFIG_LESS) += xregcomp.o
|
|
|
- lib-$(CONFIG_DEVFSD) += xregcomp.o
|
|
|
-+
|
|
|
+--- busybox-1.7.2.orig/libbb/Kbuild 2007-10-05 01:43:59.387501141 +0200
|
|
|
++++ busybox-1.7.2/libbb/Kbuild 2007-10-05 01:43:59.751521884 +0200
|
|
|
+@@ -99,6 +99,7 @@
|
|
|
+ lib-y += xreadlink.o
|
|
|
+
|
|
|
+ # conditionally compiled objects:
|
|
|
+lib-$(CONFIG_AWX) += cgi.o
|
|
|
-+
|
|
|
+ lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o
|
|
|
+ lib-$(CONFIG_LOSETUP) += loop.o
|
|
|
+ lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o
|