| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
For some reason the progress bar in wget has never been enabled.
Costs 1536-1600 bytes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
No further problems with CRLF handling have been reported. Remove
the configuration option that allowed some recent changes to be
turned off.
Also, prevent some WIN32 code from being included in the POSIX
build. The faulty code is from commit 64c8f5f3d (ash: add support
for INT trap).
These changes don't alter the default WIN32 build.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add cdrop and pdrop applets as aliases for drop. If a command
isn't specified these use cmd.exe and PowerShell instead of the
BusyBox shell.
This makes it possible to choose the default shell used for SSH
connections even in older versions of OpenSSH that don't support
the DefaultShellArguments registry key.
Note that to get cmd.exe to run a command rather than an interactive
shell it's necessary to set the DefaultShellCommandOption registry
key to '/c'.
Costs 248-272 bytes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the runuser applet, leaving only drop. Move drop from
util-linux to miscutils.
A command of the form 'drop -c command' causes the BusyBox shell
to be used, just like 'drop' without any arguments. A simple
OpenSSH configuration with 'drop.exe' as DefaultShell and no
DefaultShellArguments now works both for interactive login and
to run a command. This is useful for older versions of OpenSSH
which don't support DefaultShellArguments.
Saves 208-232 bytes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a cut down, Windows-specific implementation of `runuser` from
util-linux.
This allows elevated privileges to be dropped when running in an
SSH session. It also works when using `su` or starting busybox-w32
'as administrator'.
There are complications:
- The method used to drop privileges leaves the access token in the
TokenIsElevated state. Detecting this is likely to be fragile.
- The unprivileged shell is started by CreateProcessAsUserA(). In
older versions of Windows this has to be loaded dynamically.
Adds about 900 bytes.
(GitHub issue #240)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the environment variable BB_TERMINAL_MODE as a more general way
of controlling console/terminal mode setting. The default remains
unchanged: use virtual terminal mode for output if possible but
fall back to the console API with emulated ANSI escape sequences.
Currently valid settings are:
0 Force use of console mode
1 Force use of virtual terminal mode for output
5 Prefer virtual terminal mode for output, fall back to console
Other values won't do anything useful until code elsewhere has been
updated.
BB_SKIP_ANSI_EMULATION remains available for backwards compatibility.
If both variables are set BB_TERMINAL_MODE takes precedence.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As noted in commit 2d848eba5 (ash: fix CRLF handling) all CRs are
removed when scripts are read. Allow an alternative approach
(configurable at build-time, enabled by default):
- Do not strip CRs from input.
- Treat CR as similar to space or tab in base syntax mode.
- Adjust pgetc_eatbnl() to handle backslash-CRLF in the same way
as backslash-LF.
With these changes scripts containing CRLF line endings are more
likely to work.
Adds 48-56 bytes.
(GitHub issue #285)
|
|
|
|
|
| |
This allows additional flexibility when another 'make' program is
present.
|
|
|
|
|
|
| |
Add a configuration that just includes make and a shell.
Add 'pdpmake' as an alias for 'make'.
|
|
|
|
|
|
| |
The sleep applet can call xfunc_die() in a variety of circumstances.
This makes the code unsuitable for use as a shell builtin. Disable
it in the default configuration.
|
|
|
|
|
|
|
|
|
| |
Upstream BusyBox has supported fractional arguments to 'read -t'
since 2017. For some reason it was never enabled in busybox-w32.
Costs 48-80 bytes.
(GitHub issue #269)
|
|
|
|
| |
The new 'tree' applet uses scandir(3) and has been disabled by default.
|
|
|
|
|
|
|
|
|
| |
This is an experimental implementation of make for busybox-w32,
based on my public domain POSIX make:
https://frippery.org/make/
(GitHub issue #44)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a Windows-specific applet to create a directory junction.
Usage: jn DIR JUNC
where DIR must be an existing directory on a local drive and JUNC
must not currently exist.
There isn't a simple WIN32 API to create directory junctions.
The implementation of mklink in ReactOS provided useful inspiration.
|
| |
|
|
|
|
|
|
|
|
|
| |
Provide a WIN32 implementation of clock_gettime(2), though only
with support for CLOCK_REALTIME. This makes it possible to enable
FEATURE_DATE_NANO which adds support for the %N date format.
MinGW-w64 has clock_gettime(2) but it's in the winpthreads library
and we don't want to bother with that.
|
| |
|
|
|
|
|
|
|
|
| |
Fix conflicts in reset and ash.
Redefine the new safe_read_key() as a reference to read_key().
Disable SHA256_HWACCEL.
|
|
|
|
|
|
|
| |
Fix merge conflicts in coreutils/ls.c and shell/ash.c.
Update config files to turn off SHA1_HWACCEL. It uses non-portable
assembler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rationale for the jobs builtin in POSIX notes:
The jobs utility is not dependent on the job control option,
as are the seemingly related bg and fg utilities because jobs
is useful for examining background jobs, regardless of the
condition of job control. When the user has invoked a set +m
command and job control has been turned off, jobs can still be
used to examine the background jobs associated with that current
session. Similarly, kill can then be used to kill background
jobs with kill %<background job number>.
Although ash in busybox-w32 doesn't support job control it can
handle background jobs.
Allow the ASH_JOB_CONTROL setting to enable certain features:
- the jobs builtin;
- killing of jobs by job id in the kill builtin;
- monitoring of changes to jobs.
Since process groups aren't supported it's necessary to kill the
processes constituting a background job individually. When doing
this we ask kill(2) to kill all children too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create mingw_strptime() to return timezone offset as a separate
argument (since Microsoft's struct tm doesn't have the required
member).
Import timegm() from musl.
Update parse_datestr() to use mingw_strptime().
Enable FEATURE_TIMEZONE in the default configuration.
GitHub issue #230.
|
|
|
|
| |
Disable FEATURE_TIMEZONE for now.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a limited version of the 'fileformats' option. Only the
'dos,unix' and 'unix,dos' settings are allowed with the former
as default.
When a file is read for editing its format is detected. If it
only has LF line endings it's treated as being of type 'unix'
otherwise its type is 'dos'.
When an empty edit buffer is created it's given the first file
type listed in 'fileformats'.
The file type is stored in the read-only option 'fileformat'
and is used to select the appropriate line endings when the
file is written.
See GitHub issue #220. Adds 168 bytes to the binary.
|
|
|
|
|
| |
Disable ASH_OPTIMIZE_FOR_SIZE to pick up the ${v//pattern/repl}
speed up.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that mingw-w64 no longer requires unwind tables in the
64-bit build, resulting in a significant reduction in the size of
the binary.
The flags for unwind tables were added in commit 535ec990c (mingw:
include unwind tables in 64-bit build by default). Removing them
means that the only difference between the 32- and 64-bit config
files is the compiler prefix.
|
|
|
|
|
| |
Enable the sync applet by default. It doesn't actually do anything
useful but at least it prevents some scripts from failing.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fill the uptime member of the sysinfo structure. With this change
we can:
- use sysinfo(2) in the 'ps' applet;
- enable the 'uptime' applet (though without useful support for
load averages).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an experimental implementation of sysinfo(2)/free(1).
It uses the WIN32 API GlobalMemoryStatusEx() to obtain information
about memory.
It seems that the 'total pagefile' value includes total RAM as well
as pagefile and 'available pagefile' includes available RAM. So the
RAM values are deducted.
I've no idea what corresponds to Linux buffers and cache.
|
|
|
|
|
|
| |
Use the WIN32 API GetProcessAffinityMask() to obtain the number
of processors configured and the number available to the current
process. This only works for up to 64 processors.
|
| |
|
|
|
|
|
|
|
| |
There doesn't seem to be much advantage in having readlink(2) as a
configuration option. Making it unconditional reduces divergence from
upstream and allows the removal of a check for ENOSYS that's been in
busybox-w32 since the start.
|
|
|
|
|
|
| |
Use a more accurate technique to map RGB colours to standard
Windows console colours. Since this costs 648 bytes it's
configurable but is enabled by default.
|
|
|
|
|
|
|
|
|
| |
Change the default 'skip ANSI emulation' setting which is used when
the environment variable BB_SKIP_ANSI_EMULATION is unset. Previously
it was 0 (always emulate) now it's 2 (detect whether or not the
terminal supports ANSI escape sequences and behave accordingly).
The default value is also now a build-time option.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Attempting to set file ownership and permissions may not work
exactly as on *NIX.
|
|
|
|
|
|
|
|
|
|
| |
The chattr and lsattr utilities allow file attributes to be changed
and displayed. Modify them to support Windows file attributes using
the same names as Cygwin.
Only allow a limited subset of attributes to be changed: just most of
those supported by SetFileAttributes(). Since it isn't possible to set
all attributes the '=' operator isn't allowed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change how busybox.exe expands wildcards on the command line.
When globbing is enabled at compile time provide an implementation
of _setargv(), which is run early during startup of C programs. This:
- enables globbing by setting _dowildcard to -1
- checks for the presence of the environment BB_GLOBBING
- if it exists and is set to 0 disables globbing
- if it doesn't exist sets BB_GLOBBING=0 but continues to apply
Windows' globbing in the current process
The consequences of this are:
- When busybox.exe is initially run from a Command Prompt Windows'
globbing is applied;
- Windows' globbing is turned off for future child processes, thus
allowing the shell re-execute busybox.exe without it interfering
with wildcards;
- this behaviour can be overridden by setting BB_GLOBBING explicitly.
Globbing can still be disabled at compile time if required. In that
case BB_GLOBBING has no effect.
With these changes globbing can be enabled by default and BusyBox
will do the right thing in most circumstances.
(See GitHub issues #172 and #189.)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use ReadDirectoryChangesW to implement inotifyd for WIN32.
There are limitations:
- It's only possible to watch directories, not files.
- The notification doesn't distinguish between different changes to
file state. All changes other than creation, deletion and renaming
are reported as 'c'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the WIN32 port inetd mode is used in the same way as in NOMMU
to process each new connection. However, it shares a problem with
NOMMU mode upstream: the child process changes directory unnecessarily.
Thus, 'httpd -fvvvp 8080 -h www' fails with errors:
httpd: can't change directory to 'www': No such file or directory
Fix this in the WIN32 port by not changing directory in inetd mode.
The behaviour of inetd mode is now quite unlike upstream so the option
have been changed to '-I' and removed from the help message.
Since the -e/-d options appear in the help message unconditionally
FEATURE_HTTPD_ENCODE_URL_STR has been enabled.
|
|
|
|
|
|
|
|
| |
Port the time applet to WIN32. This requires the implemntation of
a replacement for wait3(2).
Only elapsed, user and system times are supported, not the memory
and i/o statistics reported by GNU time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable the httpd applet in WIN32 default configurations. Some
additional features have also been enabled:
'Ranges:' header
Basic HTTP authentication
Custom error pages
GZIP content encoding
Common Gateway Interface (CGI) and related features are not enabled.
Basic HTTP authentication requires bb_simplify_abs_path_inplace().
This function shouldn't be used for WIN32 paths. In this case it's
processing a URL which is OK.
|