aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Update MinGW default configurationRon Yorston2014-06-301-1/+11
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-06-3043-139/+908
|\|
| * cpio: reinstate "options:" line in help textDenys Vlasenko2014-06-301-0/+1
| | | | | | | | | | | | | | Otherwise, help text is confusing: where do operation modes end and where options start? Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Rename INIT_LAST to INIT_FUNC to avoid confusionBartosz Golaszewski2014-06-302-3/+3
| | | | | | | | | | | | | | | | | | | | | | We don't have an INIT_FIRST, so let's rename INIT_LAST to INIT_FUNC to imply that the function is called at program start-up. Also: the priority argument for __attribute__((constructor)) isn't used, so let's remove it. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fatattr: new appletPascal Bellard2014-06-301-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta fatattr_main - 281 +281 packed_usage 29821 29871 +50 bit_to_char - 10 +10 applet_names 2472 2480 +8 applet_main 1436 1440 +4 applet_nameofs 718 720 +2 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 4/0 up/down: 355/0) Total: 355 bytes Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: add overflow checkDenys Vlasenko2014-06-302-0/+5
| | | | | | | | | | | | | | | | | | | | See CVE-2014-4607 http://www.openwall.com/lists/oss-security/2014/06/26/20 function old new delta lzo1x_decompress_safe 1010 1031 +21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * stat: fix printing selinux context and null-dereferenceMichael Gernoth2014-06-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | busybox stat tries to always print the selinux context, even if it is not requested which leads to a segmentation fault due to dereferencing a null-pointer. This also changes the format-string used to print the context to so it actually produces useful output. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: do not use root_fd if we are not in chrootDenys Vlasenko2014-06-271-2/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: for LIST, open current directory *in the child*Denys Vlasenko2014-06-271-3/+5
| | | | | | | | | | | | Last change introduced an open fd leak. This is the fix. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: escape chroot prior to re-executing ls helperDenys Vlasenko2014-06-271-32/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we merely chdir to saved "real" root fd, exec("proc/self/exe") works for static executables but not for dynamic ones (they can't find their interpreter). With this patch, we also *chroot* to real root. As a bonus, this gives us proper usernames, timezone conversion etc. function old new delta popen_ls 203 259 +56 ftpd_main 2362 2366 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: fix handling of "if ... break ; else ..." - closes 7226Denys Vlasenko2014-06-262-0/+18
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: optimize writes of LIST results a bitDenys Vlasenko2014-06-261-5/+10
| | | | | | | | | | | | | | function old new delta handle_dir_common 201 207 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nanddump: change default to --bb=skipbadRichard Genoud2014-06-251-1/+1
| | | | | | | | | | | | | | | | since mtd-utils 1.4.7, the default behaviour of nanddump is skipbad (commit 2521d4f1b6b9866a9c89f3c11a4f6a3d763ff1d7) Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nanddump: kill -b Omit bad blockRichard Genoud2014-06-251-26/+12
| | | | | | | | | | | | | | | | since mtd-utils 1.4.7, the omit bad block method has been removed. (cf commit d8b8f780ec3c916f3990e9227d6bfbb22bf42ef8) Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nanddump: add options --bb=skipbad and padbadRichard Genoud2014-06-251-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In mtd-utils, the bad block options changed in favor of --bb=[skipbad|padbad|dumpbad] and omitbad has been removed. This patch add the --bb=skipbad and padbad methods to busybox' nanddump. padbad is the current default behaviour. The difference between skipbad and omitbad is this one: On a 16K block NAND, if the 1st block of mtd0 is bad, we'll have: nanddump -b -l 16384 /dev/mtd0 | wc -c 0 nanddump --bb=skipbad -l 16384 /dev/mtd0 | wc -c 16384 <- data from 1st good block Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nanddump: correct rounding to next page (lead to infinite loop)Richard Genoud2014-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rounding to next page formula was wrong: ex: (len | ~(meminfo->writesize - 1)) + 1; len=128K writesize=4K (len | ~(meminfo->writesize - 1)) + 1 => 4 294 963 201 ?! correct rounding formula: ((len - 1) | (meminfo->writesize - 1)) + 1 => 128K len = 130K ((len - 1) | (meminfo->writesize - 1)) + 1 => 132K modprobe nandsim parts="20,20" badblocks="22,23" without patch: nanddump /dev/mtd1 | wc -c [...] infinite loop with the patch: nanddump /dev/mtd1 | wc -c 327680 Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: support deprecated XPWD commandDenys Vlasenko2014-06-251-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix compile failure if both ARG_MAX and _SC_ARG_MAX are definedDenys Vlasenko2014-06-251-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unlink: new appletIsaac Dunham2014-06-221-0/+34
| | | | | | | | | | | | | | | | | | function old new delta unlink_main - 45 +45 packed_usage 29667 29686 +19 Signed-off-by: Isaac Dunham <ibid.ag@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unit-tests: implement the unit-testing frameworkBartosz Golaszewski2014-06-228-12/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This set of patches adds a simple unit-testing framework to Busybox unit-tests: add some helper macros for unit-test framework implementation unit-tests: implement the unit-testing framework unit-tests: add basic documentation on writing the unit test cases unit-tests: modify the Makefile 'test' target to run unit-tests too unit-tests: add two example test cases unit-tests: modify the existing strrstr test code to use the unit-test framework Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: use a wrapper around sysconf(_SC_CLK_TCK) to save a few bytesBartosz Golaszewski2014-06-227-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_sc_clk_tck - 10 +10 timescmd 118 113 -5 print_route 1763 1758 -5 mpstat_main 1288 1283 -5 iostat_main 1947 1942 -5 INET_setroute 879 871 -8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * find: use sysconf(_SC_ARG_MAX) to determine the command-line size limitDenys Vlasenko2014-06-225-17/+38
| | | | | | | | | | | | | | | | | | | | | | | | The find utility uses a hardcoded value of 32 * 1024 as the limit of the command-line length when calling 'find -exec ... {} +'. This results in over 4 times more execve() calls than in coreutils' find. This patch uses the limit defined in system headers. Based on the patch by Bartosz Golaszewski <bartekgola@gmail.com>. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * find: exit code fixes for find -execDenys Vlasenko2014-06-192-8/+35
| | | | | | | | | | | | | | function old new delta func_exec 127 100 -27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * find: add optional support for '-exec ... {} +'Bartosz Golaszewski2014-06-171-15/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta do_exec - 309 +309 parse_params 1416 1487 +71 find_main 342 406 +64 packed_usage 29958 30014 +56 func_exec 138 127 -11 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 500/-11) Total: 489 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: make hostname sanitization optional. Closes 3979Denys Vlasenko2014-06-162-0/+15
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * syslogd: Unify unlink/truncate + unlock log-rotation logicJoshua Judson Rosen2014-06-021-19/+11
| | | | | | | | | | | | | | | | | | Always unlink + reopen, rather than sometimes using ftruncate(); using a single code-path reduces the opportunity for either mistakes or duplicate code. Signed-off-by: Joshua Judson Rosen <jrosen@harvestai.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * syslogd: remember to un-writelock log-files even when called with "-b 0"Joshua Judson Rosen2014-06-021-0/+4
| | | | | | | | | | Signed-off-by: Joshua Judson Rosen <jrosen@harvestai.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * syslogd: avoid spurious ftrunctate() calls for "-b 0"Joshua Judson Rosen2014-06-021-0/+6
| | | | | | | | | | | | | | | | | | Forgetting to re-set log_file->size after truncating to zero discards log-data for the next 1 second following an oversize-induced purge, when we shouldn't necessarily throw that data away. Signed-off-by: Joshua Judson Rosen <jrosen@harvestai.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modprobe-small: fix safe_strncpy truncating last char of module nameDenys Vlasenko2014-05-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Add conditional support for -v / --verboseDenys Vlasenko2014-05-1911-10/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With FEATURE_VERBOSE off, practically no size change. With it on: function old new delta remove_file 493 556 +63 install_main 719 765 +46 bb_make_directory 383 419 +36 rmdir_main 162 191 +29 copy_file 1516 1544 +28 mv_main 502 525 +23 cmp_main 677 693 +16 bbconfig_config_bz2 5264 5279 +15 mkdir_main 158 168 +10 install_longopts 66 76 +10 rm_main 167 175 +8 nexpr 840 846 +6 scan_tree 275 280 +5 fsck_main 1807 1811 +4 ed_main 2541 2545 +4 expand_one_var 1574 1575 +1 swap_on_off_main 420 418 -2 parse_command 1443 1440 -3 redirect 1279 1274 -5 do_load 946 918 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 16/4 up/down: 304/-38) Total: 266 bytes Based on the patch by Igor Živković. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * getty: explain when setsid() fails. no code changesDenys Vlasenko2014-05-111-0/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Merge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busyboxDenys Vlasenko2014-05-110-0/+0
| |\
| * | trylink: emit names of linked executablesDenys Vlasenko2014-05-031-0/+2
| | | | | | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * | which: rewriteTimo Teräs2014-05-031-60/+23
| | | | | | | | | | | | | | | | | | | | | function old new delta which_main 237 212 -25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | | ash: support UNC paths in cd commandRon Yorston2014-05-211-13/+20
| | |
* | | Tidy up mingw_popenRon Yorston2014-05-151-59/+47
| | | | | | | | | | | | This also fixes piping output to a command in awk.
* | | MinGW: rename execable -> executableRon Yorston2014-05-065-5/+5
| | |
* | | Update MinGW default configurationRon Yorston2014-05-061-5/+10
| | |
* | | Merge branch 'busybox' into mergeRon Yorston2014-05-0644-783/+1697
|\ \ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: debianutils/which.c editors/vi.c libbb/executable.c
| * | trylink: emit names of linked executablesDenys Vlasenko2014-05-041-0/+2
| | | | | | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * | which: rewriteTito Ragusa2014-05-041-60/+23
| |/ | | | | | | | | | | | | | | function old new delta which_main 237 212 -25 Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: rename execable -> executable. No code changesDenys Vlasenko2014-05-026-18/+18
| | | | | | | | | | | | English speakers complained that it sounded awfully broken. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix empty PATH components handlingDenys Vlasenko2014-05-021-12/+18
| | | | | | | | | | | | | | | | function old new delta find_execable 81 86 +5 exists_execable 71 66 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * rtcwake: fix incorrect (reversed) rtc/sys adjuestment; code shrinkDenys Vlasenko2014-05-021-23/+32
| | | | | | | | | | | | | | function old new delta rtcwake_main 482 462 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix thinko in rtc_xopen()Denys Vlasenko2014-05-021-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make rtc_xopen try harder on EBUSYDenys Vlasenko2014-05-021-10/+42
| | | | | | | | | | | | | | function old new delta rtc_xopen 77 139 +62 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix compile failuresDenys Vlasenko2014-05-022-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crond: implement "SHELL=prog" in crontab. Export LOGNAME as POSIX wantsDenys Vlasenko2014-04-301-24/+48
| | | | | | | | | | | | | | | | | | | | | | function old new delta fork_job 343 456 +113 load_crontab 688 777 +89 crond_main 1456 1434 -22 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 202/-22) Total: 180 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crond: simplify logging codeDenys Vlasenko2014-04-301-87/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slight change in behavior: now -l 5 will enable the same messages formerly only enabled for -d 5. (Old behavior was non-sensical). function old new delta reopen_logfile_to_stderr - 34 +34 log8 - 26 +26 log7 - 26 +26 log5 - 26 +26 load_crontab 706 688 -18 rescan_crontab_dir 157 137 -20 crond_main 1486 1456 -30 fork_job 389 343 -46 crondlog 108 38 -70 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 0/5 up/down: 112/-184) Total: -72 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make syslog level for bb_error_msg's configurable. use it in crondDenys Vlasenko2014-04-303-16/+11
| | | | | | | | | | | | | | | | | | function old new delta bb_verror_msg 380 386 +6 syslog_level - 1 +1 crondlog 165 108 -57 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>