Changeset b447770 in freewrt
- Timestamp:
- Feb 5, 2007, 1:17:00 PM (19 years ago)
- Children:
- 017c725
- Parents:
- 9696d46
- Location:
- package/busybox/patches
- Files:
-
- 2 deleted
- 5 edited
-
200-etc_crontabs.patch (modified) (2 diffs)
-
300-netmsg.patch (modified) (3 diffs)
-
310-passwd_access.patch (modified) (2 diffs)
-
320-httpd_address_binding.patch (deleted)
-
330-httpd_user_agent.patch (modified) (1 diff)
-
340-lock_util.patch (modified) (6 diffs)
-
913-libbb_hash.patch (deleted)
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.c2 --- busybox-1. 2.1.orig/miscutils/crond.c 2006-07-01 00:42:09.000000000 +02003 +++ busybox-1. 2.1/miscutils/crond.c 2006-10-23 16:33:40.000000000 +02004 @@ - 33,7 +33,7 @@1 diff -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 @@ 5 5 #define arysize(ary) (sizeof(ary)/sizeof((ary)[0])) 6 6 … … 11 11 #ifndef TMPDIR 12 12 #define TMPDIR "/var/spool/cron" 13 diff -Nur busybox-1. 2.1.orig/miscutils/crontab.c busybox-1.2.1/miscutils/crontab.c14 --- busybox-1. 2.1.orig/miscutils/crontab.c 2006-07-01 00:42:09.000000000 +020015 +++ busybox-1. 2.1/miscutils/crontab.c 2006-10-23 16:33:40.000000000 +020016 @@ - 29,7 +29,7 @@17 #include <sys/resource.h>13 diff -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" 18 18 19 19 #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 @@ 1 diff -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 @@ 10 5 USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER)) 11 6 USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER)) … … 14 9 USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER)) 15 10 USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER)) 16 USE_N OHUP(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.in18 --- busybox-1. 2.0-old/networking/Config.in 2006-07-01 00:42:02.000000000 +020019 +++ busybox-1. 2.0-new/networking/Config.in 2006-07-31 11:18:01.000000000 +020020 @@ -4 45,6 +445,12@@11 USE_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 12 diff -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 @@ 21 16 help 22 17 A simple Unix utility which reads and writes data across network 23 18 connections. 19 - 24 20 + 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 26 29 + bool "netmsg" 27 30 + default n 28 31 + help 29 32 + 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 37 diff -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 48 diff -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 47 51 @@ -0,0 +1,63 @@ 48 52 +/* … … 67 71 +#endif 68 72 +{ 69 + int s , i;73 + int s; 70 74 + struct sockaddr_in addr; 71 75 + 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.c2 --- busybox-1. 2.1.orig/networking/httpd.c 2006-07-01 00:42:02.000000000 +02003 +++ busybox-1. 2.1/networking/httpd.c 2006-10-23 16:36:05.000000000 +02004 @@ -14 32,12 +1432,26 @@5 {6 char *cipher;7 char *pp;8 + char *ppnew = NULL;9 + struct passwd *pwd = NULL;1 diff -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; 10 10 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; 22 27 + } 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; 34 34 } 35 35 + if (ppnew) { … … 38 38 + } 39 39 } 40 #e ndif41 if (strc mp(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.c2 --- busybox-1. 2.1.orig/networking/httpd.c 2006-10-23 16:36:51.000000000 +02003 +++ busybox-1. 2.1/networking/httpd.c 2006-10-23 16:37:01.000000000 +02004 @@ -1 57,6 +157,7 @@5 const char *query;1 diff -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; 6 6 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;) 9 9 10 const char *configFile;10 const char *configFile; 11 11 12 @@ -1 111,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 #if def CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV18 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); 19 19 #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 } 29 27 #endif 30 28 -
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.h2 --- busybox-1. 2.2.1.orig/include/applets.h 2006-11-03 14:14:56.000000000 +01003 +++ busybox-1. 2.2.1/include/applets.h 2006-11-03 14:16:12.000000000 +01004 @@ -1 69,6 +169,7 @@1 diff -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 @@ 5 5 USE_LN(APPLET(ln, _BB_DIR_BIN, _BB_SUID_NEVER)) 6 6 USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) … … 10 10 USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS)) 11 11 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.in13 --- busybox-1. 2.2.1.orig/miscutils/Config.in 2006-07-01 00:42:09.000000000 +020014 +++ busybox-1. 2.2.1/miscutils/Config.in 2006-11-03 14:16:12.000000000 +010015 @@ -23 1,6 +231,12 @@12 diff -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 @@ 16 16 Enables the 'hdparm -d' option to get/set using_dma flag. 17 17 This is dangerous stuff, so you should probably say N. 18 18 19 +config CONFIG_LOCK19 +config LOCK 20 20 + bool "lock" 21 21 + default y … … 23 23 + Small utility for using locks in scripts 24 24 + 25 config CONFIG_MAKEDEVS25 config MAKEDEVS 26 26 bool "makedevs" 27 27 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 @@ 28 diff -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 39 diff -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 @@ 32 43 +/* 33 44 + * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> … … 89 100 + char pidstr[8]; 90 101 + 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 + } 94 107 + } 95 108 + … … 124 137 + return 0; 125 138 + } 139 + return 0; 126 140 +} 127 141 + … … 163 177 + return do_lock(); 164 178 +} 165 diff -Nur busybox-1.2.2.1.orig/miscutils/Makefile.in busybox-1.2.2.1/miscutils/Makefile.in166 --- busybox-1.2.2.1.orig/miscutils/Makefile.in 2006-10-24 22:21:17.000000000 +0200167 +++ busybox-1.2.2.1/miscutils/Makefile.in 2006-11-03 14:16:12.000000000 +0100168 @@ -20,6 +20,7 @@169 MISCUTILS-$(CONFIG_EJECT) += eject.o170 MISCUTILS-$(CONFIG_HDPARM) += hdparm.o171 MISCUTILS-$(CONFIG_LAST) += last.o172 +MISCUTILS-$(CONFIG_LOCK) += lock.o173 MISCUTILS-$(CONFIG_LESS) += less.o174 MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o175 MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o
Note:
See TracChangeset
for help on using the changeset viewer.
