aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/getopt_ulflags.c14
-rw-r--r--networking/httpd.c2
2 files changed, 14 insertions, 2 deletions
diff --git a/libbb/getopt_ulflags.c b/libbb/getopt_ulflags.c
index 9bf8c0559..04d1e669f 100644
--- a/libbb/getopt_ulflags.c
+++ b/libbb/getopt_ulflags.c
@@ -90,7 +90,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
va_start (p, applet_opts);
- for (s = applet_opts; *s; s++) {
+ /* skip GNU extension */
+ s = applet_opts;
+ if(*s == '+' || *s == '-')
+ s++;
+
+ for (; *s; s++) {
c++;
while (s[1] == ':') {
/* check GNU extension "o::" - optional arg */
@@ -99,7 +104,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
}
complementaly = xcalloc (c + 1, sizeof (t_complementaly));
c = 0;
- for (s = applet_opts; *s; s++) {
+ /* skip GNU extension */
+ s = applet_opts;
+ if(*s == '+' || *s == '-')
+ s++;
+
+ for (; *s; s++) {
complementaly->opt = *s;
complementaly->switch_on |= (1 << c);
c++;
diff --git a/networking/httpd.c b/networking/httpd.c
index e5ad7f65e..ba65e1361 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1452,7 +1452,9 @@ static int checkPerm(const char *path, const char *request)
}
#endif
if (strcmp(p, request) == 0) {
+#ifdef CONFIG_FEATURE_HTTPD_AUTH_MD5
set_remoteuser_var:
+#endif
config->remoteuser = strdup(request);
if(config->remoteuser)
config->remoteuser[(u - request)] = 0;