Changeset b447770 in freewrt


Ignore:
Timestamp:
Feb 5, 2007, 1:17:00 PM (19 years ago)
Author:
Markus Wigge <markus@…>
Children:
017c725
Parents:
9696d46
Message:
  • updated working patches
  • remvoed broken/unneeded patches

git-svn-id: svn://www.freewrt.org/branches/mwigge-busybox@1869 afb5a338-a214-0410-bd46-81f09a774fd1

Location:
package/busybox/patches
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • package/busybox/patches/200-etc_crontabs.patch

    r9696d46 rb447770  
    1 diff -Nur busybox-1.2.1.orig/miscutils/crond.c busybox-1.2.1/miscutils/crond.c
    2 --- busybox-1.2.1.orig/miscutils/crond.c        2006-07-01 00:42:09.000000000 +0200
    3 +++ busybox-1.2.1/miscutils/crond.c     2006-10-23 16:33:40.000000000 +0200
    4 @@ -33,7 +33,7 @@
     1diff -Nur busybox-1.4.1.orig/miscutils/crond.c busybox-1.4.1/miscutils/crond.c
     2--- busybox-1.4.1.orig/miscutils/crond.c        2007-01-24 22:34:48.000000000 +0100
     3+++ busybox-1.4.1/miscutils/crond.c     2007-02-05 10:49:44.000000000 +0100
     4@@ -18,7 +18,7 @@
    55 #define arysize(ary)    (sizeof(ary)/sizeof((ary)[0]))
    66 
     
    1111 #ifndef TMPDIR
    1212 #define TMPDIR          "/var/spool/cron"
    13 diff -Nur busybox-1.2.1.orig/miscutils/crontab.c busybox-1.2.1/miscutils/crontab.c
    14 --- busybox-1.2.1.orig/miscutils/crontab.c      2006-07-01 00:42:09.000000000 +0200
    15 +++ busybox-1.2.1/miscutils/crontab.c   2006-10-23 16:33:40.000000000 +0200
    16 @@ -29,7 +29,7 @@
    17  #include <sys/resource.h>
     13diff -Nur busybox-1.4.1.orig/miscutils/crontab.c busybox-1.4.1/miscutils/crontab.c
     14--- busybox-1.4.1.orig/miscutils/crontab.c      2007-01-24 22:34:48.000000000 +0100
     15+++ busybox-1.4.1/miscutils/crontab.c   2007-02-05 10:49:44.000000000 +0100
     16@@ -13,7 +13,7 @@
     17 #include "busybox.h"
    1818 
    1919 #ifndef CRONTABS
  • package/busybox/patches/300-netmsg.patch

    r9696d46 rb447770  
    1 # Copyright (C) 2006 OpenWrt.org
    2 #
    3 # This is free software, licensed under the GNU General Public License v2.
    4 # See /LICENSE for more information.
    5 #
    6 diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h
    7 --- busybox-1.2.0-old/include/applets.h 2006-07-31 10:47:56.000000000 +0200
    8 +++ busybox-1.2.0-new/include/applets.h 2006-07-31 11:21:00.000000000 +0200
    9 @@ -200,6 +200,7 @@
     1diff -Nur busybox-1.4.1.orig/include/applets.h busybox-1.4.1/include/applets.h
     2--- busybox-1.4.1.orig/include/applets.h        2007-01-24 22:34:48.000000000 +0100
     3+++ busybox-1.4.1/include/applets.h     2007-02-05 13:11:49.000000000 +0100
     4@@ -209,6 +209,7 @@
    105 USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER))
    116 USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER))
     
    149 USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER))
    1510 USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER))
    16  USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
    17 diff -ruN busybox-1.2.0-old/networking/Config.in busybox-1.2.0-new/networking/Config.in
    18 --- busybox-1.2.0-old/networking/Config.in      2006-07-01 00:42:02.000000000 +0200
    19 +++ busybox-1.2.0-new/networking/Config.in      2006-07-31 11:18:01.000000000 +0200
    20 @@ -445,6 +445,12 @@
     11 USE_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
     12diff -Nur busybox-1.4.1.orig/networking/Config.in busybox-1.4.1/networking/Config.in
     13--- busybox-1.4.1.orig/networking/Config.in     2007-01-24 22:34:34.000000000 +0100
     14+++ busybox-1.4.1/networking/Config.in  2007-02-05 13:12:25.000000000 +0100
     15@@ -458,7 +458,7 @@
    2116        help
    2217          A simple Unix utility which reads and writes data across network
    2318          connections.
     19-
    2420+         
    25 +config CONFIG_NETMSG
     21 config NC_SERVER
     22        bool "Netcat server options (-lp)"
     23        default n
     24@@ -475,6 +475,12 @@
     25          making or receiving a successful connection), -i (delay interval for
     26          lines sent), -w (timeout for initial connection).
     27 
     28+config NETMSG
    2629+       bool "netmsg"
    2730+       default n
    2831+       help
    2932+         simple program for sending udp broadcast messages
    30  
    31  config CONFIG_NC_GAPING_SECURITY_HOLE
    32         bool "gaping security hole"
    33 diff -ruN busybox-1.2.0-old/networking/Makefile.in busybox-1.2.0-new/networking/Makefile.in
    34 --- busybox-1.2.0-old/networking/Makefile.in    2006-07-01 00:42:02.000000000 +0200
    35 +++ busybox-1.2.0-new/networking/Makefile.in    2006-07-31 11:18:01.000000000 +0200
    36 @@ -30,6 +30,7 @@
    37  NETWORKING-$(CONFIG_IPTUNNEL)     += iptunnel.o
    38  NETWORKING-$(CONFIG_NAMEIF)       += nameif.o
    39  NETWORKING-$(CONFIG_NC)           += nc.o
    40 +NETWORKING-$(CONFIG_NETMSG)       += netmsg.o
    41  NETWORKING-$(CONFIG_NETSTAT)      += netstat.o
    42  NETWORKING-$(CONFIG_NSLOOKUP)     += nslookup.o
    43  NETWORKING-$(CONFIG_PING)         += ping.o
    44 diff -ruN busybox-1.2.0-old/networking/netmsg.c busybox-1.2.0-new/networking/netmsg.c
    45 --- busybox-1.2.0-old/networking/netmsg.c       1970-01-01 01:00:00.000000000 +0100
    46 +++ busybox-1.2.0-new/networking/netmsg.c       2006-07-31 11:18:01.000000000 +0200
     33+
     34 config NETSTAT
     35        bool "netstat"
     36        default n
     37diff -Nur busybox-1.4.1.orig/networking/Kbuild busybox-1.4.1/networking/Kbuild
     38--- busybox-1.4.1.orig/networking/Kbuild        2007-01-24 22:34:34.000000000 +0100
     39+++ busybox-1.4.1/networking/Kbuild     2007-02-05 13:11:49.000000000 +0100
     40@@ -27,6 +27,7 @@
     41 lib-$(CONFIG_IPTUNNEL)     += iptunnel.o
     42 lib-$(CONFIG_NAMEIF)       += nameif.o
     43 lib-$(CONFIG_NC)           += nc.o
     44+lib-$(CONFIG_NETMSG)       += netmsg.o
     45 lib-$(CONFIG_NETSTAT)      += netstat.o
     46 lib-$(CONFIG_NSLOOKUP)     += nslookup.o
     47 lib-$(CONFIG_PING)         += ping.o
     48diff -Nur busybox-1.4.1.orig/networking/netmsg.c busybox-1.4.1/networking/netmsg.c
     49--- busybox-1.4.1.orig/networking/netmsg.c      1970-01-01 01:00:00.000000000 +0100
     50+++ busybox-1.4.1/networking/netmsg.c   2007-02-05 13:11:49.000000000 +0100
    4751@@ -0,0 +1,63 @@
    4852+/*
     
    6771+#endif
    6872+{
    69 +       int s, i;
     73+       int s;
    7074+       struct sockaddr_in addr;
    7175+       int optval = 1;
  • package/busybox/patches/310-passwd_access.patch

    r9696d46 rb447770  
    1 diff -Nur busybox-1.2.1.orig/networking/httpd.c busybox-1.2.1/networking/httpd.c
    2 --- busybox-1.2.1.orig/networking/httpd.c       2006-07-01 00:42:02.000000000 +0200
    3 +++ busybox-1.2.1/networking/httpd.c    2006-10-23 16:36:05.000000000 +0200
    4 @@ -1432,12 +1432,26 @@
    5                 {
    6                         char *cipher;
    7                         char *pp;
    8 +                       char *ppnew = NULL;
    9 +                       struct passwd *pwd = NULL;
     1diff -Nur busybox-1.4.1.orig/networking/httpd.c busybox-1.4.1/networking/httpd.c
     2--- busybox-1.4.1.orig/networking/httpd.c       2007-01-24 22:34:34.000000000 +0100
     3+++ busybox-1.4.1/networking/httpd.c    2007-02-05 11:05:12.000000000 +0100
     4@@ -1402,12 +1402,26 @@
     5                        if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {
     6                                char *cipher;
     7                                char *pp;
     8+                               char *ppnew = NULL;
     9+                               struct passwd * pwd = NULL;
    1010 
    11                         if(strncmp(p, request, u-request) != 0) {
    12                                 /* user uncompared */
    13                                 continue;
    14                         }
    15                         pp = strchr(p, ':');
    16 +                       if(pp && pp[1] == '$' && pp[2] == 'p' &&
    17 +                                                pp[3] == '$' && pp[4] &&
    18 +                                                (pwd = getpwnam(&pp[4])) != NULL) {
    19 +                               if(pwd->pw_passwd && pwd->pw_passwd[0] == '!') {
    20 +                                       prev = NULL;
    21 +                                       continue;
     11                                if (strncmp(p, request, u-request) != 0) {
     12                                        /* user uncompared */
     13                                        continue;
     14                                }
     15                                pp = strchr(p, ':');
     16+                               if(pp && pp[1] == '$' && pp[2] == 'p' &&
     17+                                                        pp[3] == '$' && pp[4] &&
     18+                                                        (pwd = getpwnam(&pp[4])) != NULL) {
     19+                                       if(pwd->pw_passwd && pwd->pw_passwd[0] == '!') {
     20+                                               prev = NULL;
     21+                                               continue;
     22+                                       }
     23+                                       ppnew = malloc(5 + strlen(pwd->pw_passwd));
     24+                                       ppnew[0] = ':';
     25+                                       strcpy(ppnew + 1, pwd->pw_passwd);
     26+                                       pp = ppnew;
    2227+                               }
    23 +                               ppnew = malloc(5 + strlen(pwd->pw_passwd));
    24 +                               ppnew[0] = ':';
    25 +                               strcpy(ppnew + 1, pwd->pw_passwd);
    26 +                               pp = ppnew;
    27 +                       }
    28                         if(pp && pp[1] == '$' && pp[2] == '1' &&
    29                                                  pp[3] == '$' && pp[4]) {
    30                                 pp++;
    31 @@ -1447,6 +1461,10 @@
    32                                 /* unauthorized */
    33                                 continue;
     28                                if (pp && pp[1] == '$' && pp[2] == '1' &&
     29                                                pp[3] == '$' && pp[4]) {
     30                                        pp++;
     31@@ -1506,6 +1520,10 @@
     32                                sendHeaders(HTTP_NOT_IMPLEMENTED);
     33                                break;
    3434                        }
    3535+                       if (ppnew) {
     
    3838+                       }
    3939                }
    40  #endif
    41                 if (strcmp(p, request) == 0) {
     40 #else
     41                if (strcasecmp(buf, request_GET) != 0) {
  • package/busybox/patches/330-httpd_user_agent.patch

    r9696d46 rb447770  
    1 diff -Nur busybox-1.2.1.orig/networking/httpd.c busybox-1.2.1/networking/httpd.c
    2 --- busybox-1.2.1.orig/networking/httpd.c       2006-10-23 16:36:51.000000000 +0200
    3 +++ busybox-1.2.1/networking/httpd.c    2006-10-23 16:37:01.000000000 +0200
    4 @@ -157,6 +157,7 @@
    5    const char *query;
     1diff -Nur busybox-1.4.1.orig/networking/httpd.c busybox-1.4.1/networking/httpd.c
     2--- busybox-1.4.1.orig/networking/httpd.c       2007-01-24 22:34:34.000000000 +0100
     3+++ busybox-1.4.1/networking/httpd.c    2007-02-05 13:15:17.000000000 +0100
     4@@ -137,6 +137,7 @@
     5        const char *query;
    66 
    7    USE_FEATURE_HTTPD_CGI(char *referer;)
    8 +  USE_FEATURE_HTTPD_CGI(char *user_agent;)
     7        USE_FEATURE_HTTPD_CGI(char *referer;)
     8+       USE_FEATURE_HTTPD_CGI(char *user_agent;)
    99 
    10    const char *configFile;
     10        const char *configFile;
    1111 
    12 @@ -1111,6 +1112,7 @@
    13        addEnv("SERVER",         "PROTOCOL", "HTTP/1.0");
    14        addEnv("GATEWAY_INTERFACE", "",      "CGI/1.1");
    15        addEnv("REMOTE",         "ADDR",     config->rmt_ip_str);
    16 +      addEnv("HTTP","USER_AGENT", config->user_agent);
    17  #ifdef CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
    18        addEnvPort("REMOTE");
     12@@ -1066,6 +1067,7 @@
     13                        if (cp) *cp = '\0'; /* delete :PORT */
     14                        setenv1("REMOTE_ADDR", p);
     15                }
     16+               setenv1("HTTP_USER_AGENT", config->user_agent);
     17 #if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
     18                setenv_long("REMOTE_PORT", config->port);
    1919 #endif
    20 @@ -1676,6 +1678,10 @@
    21                   for(test = buf + 8; isspace(*test); test++)
    22                           ;
    23                   config->referer = strdup(test);
    24 +       } else if ((strncasecmp(buf, "User-Agent:",11) ==0)) {
    25 +               for(test = buf + 11; isspace(*test); test++)
    26 +                       ;
    27 +               config->user_agent = strdup(test);
    28         }
     20@@ -1629,6 +1631,8 @@
     21                                        content_type = strdup(skip_whitespace(buf + sizeof("Content-Type:")-1));
     22                                } else if ((STRNCASECMP(buf, "Referer:") == 0)) {
     23                                        config->referer = strdup(skip_whitespace(buf + sizeof("Referer:")-1));
     24+                               } else if ((STRNCASECMP(buf, "User-Agent:") == 0)) {
     25+                                       config->user_agent = strdup(skip_whitespace(buf + sizeof("User-Agent:")-1));
     26                                }
    2927 #endif
    3028 
  • package/busybox/patches/340-lock_util.patch

    r9696d46 rb447770  
    1 diff -Nur busybox-1.2.2.1.orig/include/applets.h busybox-1.2.2.1/include/applets.h
    2 --- busybox-1.2.2.1.orig/include/applets.h      2006-11-03 14:14:56.000000000 +0100
    3 +++ busybox-1.2.2.1/include/applets.h   2006-11-03 14:16:12.000000000 +0100
    4 @@ -169,6 +169,7 @@
     1diff -Nur busybox-1.4.1.orig/include/applets.h busybox-1.4.1/include/applets.h
     2--- busybox-1.4.1.orig/include/applets.h        2007-02-05 11:01:25.000000000 +0100
     3+++ busybox-1.4.1/include/applets.h     2007-02-05 13:04:14.000000000 +0100
     4@@ -178,6 +178,7 @@
    55 USE_LN(APPLET(ln, _BB_DIR_BIN, _BB_SUID_NEVER))
    66 USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
     
    1010 USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS))
    1111 USE_LOGNAME(APPLET(logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
    12 diff -Nur busybox-1.2.2.1.orig/miscutils/Config.in busybox-1.2.2.1/miscutils/Config.in
    13 --- busybox-1.2.2.1.orig/miscutils/Config.in    2006-07-01 00:42:09.000000000 +0200
    14 +++ busybox-1.2.2.1/miscutils/Config.in 2006-11-03 14:16:12.000000000 +0100
    15 @@ -231,6 +231,12 @@
     12diff -Nur busybox-1.4.1.orig/miscutils/Config.in busybox-1.4.1/miscutils/Config.in
     13--- busybox-1.4.1.orig/miscutils/Config.in      2007-01-24 22:34:48.000000000 +0100
     14+++ busybox-1.4.1/miscutils/Config.in   2007-02-05 13:04:14.000000000 +0100
     15@@ -237,6 +237,12 @@
    1616          Enables the 'hdparm -d' option to get/set using_dma flag.
    1717          This is dangerous stuff, so you should probably say N.
    1818 
    19 +config CONFIG_LOCK
     19+config LOCK
    2020+       bool "lock"
    2121+       default y
     
    2323+         Small utility for using locks in scripts
    2424+
    25  config CONFIG_MAKEDEVS
     25 config MAKEDEVS
    2626        bool "makedevs"
    2727        default n
    28 diff -Nur busybox-1.2.2.1.orig/miscutils/lock.c busybox-1.2.2.1/miscutils/lock.c
    29 --- busybox-1.2.2.1.orig/miscutils/lock.c       1970-01-01 01:00:00.000000000 +0100
    30 +++ busybox-1.2.2.1/miscutils/lock.c    2006-11-03 14:16:12.000000000 +0100
    31 @@ -0,0 +1,133 @@
     28diff -Nur busybox-1.4.1.orig/miscutils/Kbuild busybox-1.4.1/miscutils/Kbuild
     29--- busybox-1.4.1.orig/miscutils/Kbuild 2007-01-24 22:34:48.000000000 +0100
     30+++ busybox-1.4.1/miscutils/Kbuild      2007-02-05 13:04:14.000000000 +0100
     31@@ -15,6 +15,7 @@
     32 lib-$(CONFIG_HDPARM)      += hdparm.o
     33 lib-$(CONFIG_LAST)        += last.o
     34 lib-$(CONFIG_LESS)        += less.o
     35+lib-$(CONFIG_LOCK)        += lock.o
     36 lib-$(CONFIG_MAKEDEVS)    += makedevs.o
     37 lib-$(CONFIG_MOUNTPOINT)  += mountpoint.o
     38 lib-$(CONFIG_MT)          += mt.o
     39diff -Nur busybox-1.4.1.orig/miscutils/lock.c busybox-1.4.1/miscutils/lock.c
     40--- busybox-1.4.1.orig/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100
     41+++ busybox-1.4.1/miscutils/lock.c      2007-02-05 13:04:14.000000000 +0100
     42@@ -0,0 +1,136 @@
    3243+/*
    3344+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
     
    89100+       char pidstr[8];
    90101+
    91 +       if ((fd = open(file, O_RDWR | O_CREAT, 0700)) < 0) {
    92 +               fprintf(stderr, "Can't open %s\n", file);
    93 +               return 1;
     102+       if ((fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0700)) < 0) {
     103+               if ((fd = open(file, O_RDWR)) < 0) {
     104+                       fprintf(stderr, "Can't open %s\n", file);
     105+                       return 1;
     106+               }
    94107+       }
    95108+
     
    124137+               return 0;
    125138+       }
     139+       return 0;
    126140+}
    127141+
     
    163177+               return do_lock();
    164178+}
    165 diff -Nur busybox-1.2.2.1.orig/miscutils/Makefile.in busybox-1.2.2.1/miscutils/Makefile.in
    166 --- busybox-1.2.2.1.orig/miscutils/Makefile.in  2006-10-24 22:21:17.000000000 +0200
    167 +++ busybox-1.2.2.1/miscutils/Makefile.in       2006-11-03 14:16:12.000000000 +0100
    168 @@ -20,6 +20,7 @@
    169  MISCUTILS-$(CONFIG_EJECT)       += eject.o
    170  MISCUTILS-$(CONFIG_HDPARM)      += hdparm.o
    171  MISCUTILS-$(CONFIG_LAST)        += last.o
    172 +MISCUTILS-$(CONFIG_LOCK)        += lock.o
    173  MISCUTILS-$(CONFIG_LESS)        += less.o
    174  MISCUTILS-$(CONFIG_MAKEDEVS)    += makedevs.o
    175  MISCUTILS-$(CONFIG_MOUNTPOINT)  += mountpoint.o
Note: See TracChangeset for help on using the changeset viewer.