aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* win32: fix implementation of access(2)Ron Yorston2018-12-041-2/+5
| | | | | | | | | The WIN32 implementation of access(2) didn't return: - the correct value when a directory was tested for X_OK; - the correct error code when the target existed but execute permission wasn't available.
* ash: fix a couple of test casesRon Yorston2018-12-042-13/+5
| | | | | | | | | | | | | | The ash tests exitcode_EACCES and exitcode_ENOENT both failed. In commit 92dbd3c09 a test was added to tryexec to check that the file being run existed and was executable. The error codes returned by this test were incorrect. The slightly later commit f5783ef14 added a similar test in spawnveq which got the error codes right. Remove the test from tryexec and some superfluous error messages from spawnveq.
* ash: forkshell tweaksRon Yorston2018-12-041-12/+13
| | | | | | | | Make it explicit that the nodeptr array contains pointers to pointers. In debug output show both the location of pointers to be fixed and their contents.
* ash: more clean upRon Yorston2018-12-031-5/+5
|
* ash: code clean upRon Yorston2018-12-031-6/+1
|
* ash: improvements to forkshell debugRon Yorston2018-12-031-5/+23
| | | | | | | | If forkshell_print is passed a NULL file pointer it opens and closes a local one. Add the pid to the output file name so forkshell_print can be called from both parent and child.
* ash: annotate pointers in forkshell debugRon Yorston2018-12-021-42/+130
| | | | | | | Add some text to indicate the purpose of each pointer in the forkshell data block. The code isn't very efficient but it's only used for debug.
* ash: redefine SAVE_PTR macros to remove testRon Yorston2018-12-021-2/+10
| | | | | | | | | | | The SAVE_PTR macros are used to identify pointers that need to be fixed after forkshell. They're initially used in contexts where the nodeptr variable may be NULL, so have a test for this condition. Later uses are in places where nodeptr is known to have a non-NULL value so the macros can be redefined to remove the test. Saves over 100 bytes.
* ash: consolidate tests for variables not to convertRon Yorston2018-11-291-8/+5
| | | | | | | We usually convert backslashes to slashes when importing environment variables into the shell. Exceptions are if the user has set the -X option, SYSTEMROOT and COMSPEC. Perform these tests all at once rather than separately.
* ash: fixes to spawn_forkshellRon Yorston2018-11-291-16/+10
| | | | | | | If spawn fails: - raise an error in spawn_forkshell, not at each call site; - free the job by calling freejob, not free.
* nologin: change defaultRon Yorston2018-11-291-1/+1
|
* Merge branch 'busybox' into mergeRon Yorston2018-11-2869-641/+2946
|\
| * testsuite: check CONFIG_DESKTOP before using 'od -t'Chen Qi2018-11-277-5/+7
| | | | | | | | | | | | | | | | The '-t' option for od is enabled by CONFIG_DESKTOP. So check this config before using 'od -t' in test cases. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: allow hush to run embedded scriptsRon Yorston2018-11-2710-32/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | Embedded scripts require a shell to be present in the BusyBox binary. Allow either ash or hush to be used for this purpose. If both are enabled ash takes precedence. The size of the binary is unchanged in the default configuration: both ash and hush are present but support for embedded scripts isn't compiled into hush. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * free: ensure there is a least one space between numbersDenys Vlasenko2018-11-271-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * docs: add embedded-scripts.txtRon Yorston2018-11-272-1/+117
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: skip 'V' headers (GNU volume label), closes 11526Denys Vlasenko2018-11-271-1/+2
| | | | | | | | | | | | | | function old new delta get_header_tar 1696 1690 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unlzma: fix too-eager corruption checkDenys Vlasenko2018-11-271-7/+13
| | | | | | | | | | | | | | function old new delta unpack_lzma_stream 2686 2674 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: fix too eager autodetection, closes 11531Denys Vlasenko2018-11-273-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta is_suffixed_with - 54 +54 tar_main 1006 1026 +20 open_transformer 92 79 -13 config_file_action 478 458 -20 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/2 up/down: 74/-33) Total: 41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: prevent duplicate applet namesRon Yorston2018-11-271-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | The embedded script feature makes it easier to create applets with duplicate names. Currently in such cases the build succeeds but the resulting executable doesn't work as the developer intended. Catch duplicate names when the applet tables are being generated and make the build fail. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Tweaks to build process for embedded scriptsRon Yorston2018-11-275-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Force a rebuild if a script in applets_sh is changed. - Move the dummy usage messages for custom applets to usage.h and change the name from 'dummy' to 'scripted'. - Hide an error from gen_build_files.sh if an embed directory exists but is empty. - Tidy up embedded_scripts script. v2: Remove a couple of unnecessary tests in embedded_scripts, as pointed out by Xabier Oneca. Drop the stripping of comments. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: add ECDHE_PSK and remove ARIA cipher idsDenys Vlasenko2018-11-271-8/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: add _anon_ cipher definitionsDenys Vlasenko2018-11-261-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: enable TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 cipherDenys Vlasenko2018-11-261-29/+29
| | | | | | | | | | | | | | function old new delta static.ciphers 30 32 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: cipher 009D is not yet supported, don't test for itDenys Vlasenko2018-11-261-4/+3
| | | | | | | | | | | | | | function old new delta tls_handshake 2116 2108 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: speed up prf_hmac_sha256()Denys Vlasenko2018-11-261-40/+39
| | | | | | | | | | | | | | | | | | | | | | function old new delta hmac_sha_precomputed - 58 +58 prf_hmac_sha256 181 222 +41 hmac_sha256 68 - -68 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/0 up/down: 99/-68) Total: 31 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: add comment on sha384Denys Vlasenko2018-11-261-0/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: simplify hmac_begin()Denys Vlasenko2018-11-261-11/+27
| | | | | | | | | | | | | | function old new delta hmac_begin 196 158 -38 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: add support for 8 more cipher ids - all tested to workDenys Vlasenko2018-11-261-87/+117
| | | | | | | | | | | | | | | | | | | | function old new delta tls_handshake 2059 2116 +57 static.ciphers - 30 +30 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 87/0) Total: 87 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: fix commentsDenys Vlasenko2018-11-251-1/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: add a comment on expanding list of supported ciphersDenys Vlasenko2018-11-251-7/+30
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: do not leak RSA keyDenys Vlasenko2018-11-252-0/+13
| | | | | | | | | | | | | | function old new delta tls_handshake 1957 2059 +102 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: code shrinkDenys Vlasenko2018-11-252-16/+12
| | | | | | | | | | | | | | | | function old new delta xwrite_and_update_handshake_hash 81 80 -1 tls_handshake 1987 1957 -30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: code shrinkDenys Vlasenko2018-11-251-15/+16
| | | | | | | | | | | | | | function old new delta tls_handshake 1993 1987 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: code shrinkDenys Vlasenko2018-11-252-6/+14
| | | | | | | | | | | | | | function old new delta aesgcm_GHASH 223 196 -27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: on x86, use xorbuf_aligned_AES_BLOCK_SIZE() even with non-aligned sourceDenys Vlasenko2018-11-251-2/+4
| | | | | | | | | | | | | | function old new delta aesgcm_GHASH 228 223 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: actually fill in CIPHER_ID3 value in hello messageDenys Vlasenko2018-11-251-5/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: do not SEGV on "-p keyno:192.168.1.1", show --help insteadDenys Vlasenko2018-11-251-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: code shrinkDenys Vlasenko2018-11-241-8/+6
| | | | | | | | | | | | | | function old new delta base64enc 53 46 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: fix is.gd again, fix AES-CBC using decrypt key instead of encryptDenys Vlasenko2018-11-241-5/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: speed up xor'ing of aligned 16-byte buffersDenys Vlasenko2018-11-243-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta xorbuf_aligned_AES_BLOCK_SIZE - 23 +23 xwrite_encrypted 585 580 -5 aesgcm_GHASH 233 228 -5 GMULT 192 187 -5 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/3 up/down: 23/-15) Total: 8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: in AES-GCM decoding, avoid memmoveDenys Vlasenko2018-11-244-15/+17
| | | | | | | | | | | | | | | | | | | | | | function old new delta xorbuf3 - 36 +36 xorbuf 24 12 -12 tls_xread_record 656 634 -22 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 36/-34) Total: 2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: fix a thinko in GHASH optimizationDenys Vlasenko2018-11-241-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: make tls_get_random() FAST_FUNCDenys Vlasenko2018-11-232-2/+2
| | | | | | | | | | | | | | | | | | | | function old new delta tls_handshake 1977 1985 +8 tls_get_random 32 28 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 8/-4) Total: 4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: print the final newline only for non-tty outputDenys Vlasenko2018-11-233-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ busybox wget URL 2>&1 | cat Connecting to .... install.iso 0% | | 2629k 0:02:05 ETA install.iso 7% |** | 25.7M 0:00:23 ETA install.iso 16% |***** | 54.1M 0:00:14 ETA install.iso 20% |****** | 67.4M 0:00:15 ETA install.iso 25% |******** | 81.0M 0:00:14 ETA install.iso 30% |********* | 97.3M 0:00:13 ETA install.iso 36% |*********** | 117M 0:00:12 ETA install.iso 41% |************* | 134M 0:00:11 ETA install.iso 47% |*************** | 152M 0:00:10 ETA install.iso 54% |***************** | 176M 0:00:08 ETA install.iso 61% |******************* | 200M 0:00:06 ETA install.iso 66% |********************* | 215M 0:00:06 ETA install.iso 71% |********************** | 231M 0:00:05 ETA install.iso 75% |************************ | 244M 0:00:04 ETA install.iso 79% |************************* | 257M 0:00:03 ETA install.iso 84% |*************************** | 275M 0:00:02 ETA install.iso 91% |***************************** | 297M 0:00:01 ETA install.iso 99% |******************************* | 321M 0:00:00 ETA install.iso 100% |********************************| 323M 0:00:00 ETA <-- no empty line here $ function old new delta bb_progress_update 622 632 +10 progress_meter 152 158 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 16/0) Total: 16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: code shrinkDenys Vlasenko2018-11-231-3/+4
| | | | | | | | | | | | | | function old new delta aesgcm_GHASH 262 233 -29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: typo fix in commentDenys Vlasenko2018-11-231-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: make local buffers in aesgcm_GHASH() explicitly 32-bit alignedDenys Vlasenko2018-11-231-9/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: code shrinkDenys Vlasenko2018-11-232-15/+21
| | | | | | | | | | | | | | function old new delta xwrite_encrypted 599 585 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: simplify aesgcm_GHASH()Denys Vlasenko2018-11-233-47/+60
| | | | | | | | | | | | | | | | | | | | | | function old new delta xwrite_encrypted 604 599 -5 FlattenSzInBits 52 - -52 aesgcm_GHASH 395 262 -133 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/2 up/down: 0/-190) Total: -190 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>