wok-6.x rev 3319
Add busybox/ip and tftpd/ris support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 08 16:39:21 2009 +0200 (2009-06-08) |
parents | bf73355db5de |
children | f0a84dc0a7c2 |
files | busybox-pam/receipt busybox/receipt busybox/stuff/busybox-1.12.0-ris.u busybox/stuff/busybox-1.12.0.config |
line diff
1.1 --- a/busybox-pam/receipt Mon Jun 08 10:27:16 2009 +0200 1.2 +++ b/busybox-pam/receipt Mon Jun 08 16:39:21 2009 +0200 1.3 @@ -36,6 +36,9 @@ 1.4 mkswap.u 1.5 install.u 1.6 basename.u 1.7 +unlzma.u 1.8 +replay.u 1.9 +ris.u 1.10 EOT 1.11 cp $WOK/busybox/stuff/$SOURCE-$VERSION.config .config 1.12 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
2.1 --- a/busybox/receipt Mon Jun 08 10:27:16 2009 +0200 2.2 +++ b/busybox/receipt Mon Jun 08 16:39:21 2009 +0200 2.3 @@ -36,6 +36,7 @@ 2.4 basename.u 2.5 unlzma.u 2.6 replay.u 2.7 +ris.u 2.8 EOT 2.9 cp ../stuff/$PACKAGE-$VERSION.config .config 2.10 make oldconfig
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/busybox/stuff/busybox-1.12.0-ris.u Mon Jun 08 16:39:21 2009 +0200 3.3 @@ -0,0 +1,97 @@ 3.4 +--- busybox-1.12.0/networking/tftp.c 3.5 ++++ busybox-1.12.0/networking/tftp.c 3.6 +@@ -552,6 +552,63 @@ 3.7 + #undef tsize 3.8 + } 3.9 + 3.10 ++#if ENABLE_FEATURE_TFTPD_RIS 3.11 ++#include <dirent.h> 3.12 ++ 3.13 ++int lookup_entry(const char *comp, char *dest); 3.14 ++void lookup_file(char *filename); 3.15 ++ 3.16 ++int lookup_entry(const char *comp, char *dest) 3.17 ++{ 3.18 ++ DIR *dirp; 3.19 ++ struct dirent *dptr; 3.20 ++ if (!dest) return 0; 3.21 ++ dirp = opendir(dest[0] ? dest : "."); 3.22 ++ while ((dptr = readdir(dirp))) { 3.23 ++ if (!strcasecmp(dptr->d_name, comp)) { 3.24 ++ if (dest[0]) strcat(dest, "/"); 3.25 ++ strcat(dest, dptr->d_name); 3.26 ++ closedir(dirp); 3.27 ++ return 1; 3.28 ++ } 3.29 ++ } 3.30 ++ closedir(dirp); 3.31 ++ return 0; 3.32 ++} 3.33 ++ 3.34 ++void lookup_file(char *filename) 3.35 ++{ 3.36 ++ int found = 0; 3.37 ++ int len = 0; 3.38 ++ char dest[1024]; 3.39 ++ char comp[1024]; 3.40 ++ char *check = filename; 3.41 ++ char *seek = NULL; 3.42 ++ 3.43 ++ dest[0] = 0; 3.44 ++ check++; 3.45 ++ while (*check) { 3.46 ++ seek = strchr(check, '\\'); 3.47 ++ if (!seek) { 3.48 ++ if ((*check) && (lookup_entry(check, dest))) 3.49 ++ found = 1; 3.50 ++ break; 3.51 ++ } 3.52 ++ len = seek - check; 3.53 ++ memcpy(comp, check, len); 3.54 ++ comp[len]=0; 3.55 ++ if (!lookup_entry(comp, dest)) 3.56 ++ break; 3.57 ++ check += len + 1; 3.58 ++ } 3.59 ++ 3.60 ++ if (found) { 3.61 ++ filename[0] = 0; 3.62 ++ strcat(filename, dest); 3.63 ++ } 3.64 ++} 3.65 ++#endif 3.66 ++ 3.67 + #if ENABLE_TFTP 3.68 + 3.69 + int tftp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 3.70 +@@ -680,6 +737,11 @@ 3.71 + goto err; 3.72 + } 3.73 + local_file = block_buf + 2; 3.74 ++#if ENABLE_FEATURE_TFTPD_RIS 3.75 ++ if (local_file[0] == '\\') { 3.76 ++ lookup_file(local_file); 3.77 ++ } 3.78 ++#endif 3.79 + if (local_file[0] == '.' || strstr(local_file, "/.")) { 3.80 + error_msg = "dot in file name"; 3.81 + goto err; 3.82 + 3.83 +--- busybox-1.12.0/networking/Config.in 3.84 ++++ busybox-1.12.0/networking/Config.in 3.85 +@@ -794,6 +794,15 @@ 3.86 + In other words: it should be run from inetd in nowait mode, 3.87 + or from udpsvd. Example: "udpsvd -E 0 69 tftpd DIR" 3.88 + 3.89 ++config FEATURE_TFTPD_RIS 3.90 ++ bool "Enable \"RIS\" support" 3.91 ++ default y 3.92 ++ depends on TFTPD 3.93 ++ help 3.94 ++ Add support for the Remote Installation Service. This allows 3.95 ++ a client to get files starting with \ without respecting case. 3.96 ++ Each \ will be replaced by a /. 3.97 ++ 3.98 + config FEATURE_TFTP_GET 3.99 + bool "Enable \"get\" command" 3.100 + default y
4.1 --- a/busybox/stuff/busybox-1.12.0.config Mon Jun 08 10:27:16 2009 +0200 4.2 +++ b/busybox/stuff/busybox-1.12.0.config Mon Jun 08 16:39:21 2009 +0200 4.3 @@ -1,7 +1,7 @@ 4.4 # 4.5 # Automatically generated make config: don't edit 4.6 # Busybox version: 1.12.0 4.7 -# Thu May 28 13:47:09 2009 4.8 +# Mon Jun 8 16:28:18 2009 4.9 # 4.10 CONFIG_HAVE_DOT_CONFIG=y 4.11 4.12 @@ -662,19 +662,19 @@ 4.13 CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y 4.14 CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y 4.15 CONFIG_FEATURE_INETD_RPC=y 4.16 -# CONFIG_IP is not set 4.17 -# CONFIG_FEATURE_IP_ADDRESS is not set 4.18 -# CONFIG_FEATURE_IP_LINK is not set 4.19 -# CONFIG_FEATURE_IP_ROUTE is not set 4.20 -# CONFIG_FEATURE_IP_TUNNEL is not set 4.21 -# CONFIG_FEATURE_IP_RULE is not set 4.22 -# CONFIG_FEATURE_IP_SHORT_FORMS is not set 4.23 +CONFIG_IP=y 4.24 +CONFIG_FEATURE_IP_ADDRESS=y 4.25 +CONFIG_FEATURE_IP_LINK=y 4.26 +CONFIG_FEATURE_IP_ROUTE=y 4.27 +CONFIG_FEATURE_IP_TUNNEL=y 4.28 +CONFIG_FEATURE_IP_RULE=y 4.29 +CONFIG_FEATURE_IP_SHORT_FORMS=y 4.30 # CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set 4.31 -# CONFIG_IPADDR is not set 4.32 -# CONFIG_IPLINK is not set 4.33 -# CONFIG_IPROUTE is not set 4.34 -# CONFIG_IPTUNNEL is not set 4.35 -# CONFIG_IPRULE is not set 4.36 +CONFIG_IPADDR=y 4.37 +CONFIG_IPLINK=y 4.38 +CONFIG_IPROUTE=y 4.39 +CONFIG_IPTUNNEL=y 4.40 +CONFIG_IPRULE=y 4.41 CONFIG_IPCALC=y 4.42 CONFIG_FEATURE_IPCALC_FANCY=y 4.43 CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y 4.44 @@ -702,6 +702,7 @@ 4.45 # CONFIG_FEATURE_TELNETD_STANDALONE is not set 4.46 CONFIG_TFTP=y 4.47 CONFIG_TFTPD=y 4.48 +CONFIG_FEATURE_TFTPD_RIS=y 4.49 CONFIG_FEATURE_TFTP_GET=y 4.50 CONFIG_FEATURE_TFTP_PUT=y 4.51 CONFIG_FEATURE_TFTP_BLOCKSIZE=y