| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
- Update configuration files
- Omit unnecessary libraries
- Replace fake stime(2) with fake clock_settime(2)
|
| | |
|
| |
| |
| |
| |
| |
| | |
Commit 195902a64 (lineedit: improvements to tab completion) disabled
tab-completion of usernames. It was too heavy-handed, in that it
also removed tab-completion of '~/'.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The 'reset' applet attempts to reset the screen. It's more thorough
than 'clear'.
Since it tries to reset the screen buffer for the current process
it has to be a NOFORK applet.
To run the Windows executable C:/Windows/System32/reset.exe use the
full path, as the 'reset' applet will take precedence.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a drive is mapped to a network share or a path display the
mapping in the 'Filesystem' column of df's output.
Since this changes the mnt_fsname field of the mntent structure
a slight alteration is needed to print_all_cwd() in ash.
Revert the change in commit a8c63f25b that enabled FEATURE_DF_FANCY
in the default configuration. None of the additional options is
very useful.
See GitHub issue #164.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Miscellaneous improvements:
- Enable '-a' option to display all filesystems in df(1).
- Detect the UDF CDROM filesystem and display it in 'stat -f'.
- Let getmntent(3) handle CDROM and floppy devices, ignoring those
that have no media.
- Set number of inodes and filesystem flags to 0 in statfs(2).
|
| |
| |
| |
| | |
Merge FEATURE_IDENTIFY_OWNER into FEATURE_EXTRA_FILE_DATA.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use the undocumented 'runas' verb in a call to ShellExecuteEx()
to run a shell with elevated privileges.
Because of the way ShellExecuteEx() works this:
- requires that you acknowledge a User Account Control prompt (if
you're an Administrator);
- requires that you enter an Administrator's password (if you aren't
an Administrator);
- creates a separate console window for the privileged shell.
Variables from the parent shell aren't passed to its privileged child,
only variables from the environment.
It's possible to specify a command to run when the shell starts.
This can be used to pass shell variables:
su -c "HELLO='hello world'; GOODBYE=$GOODBYE"
Or do fancy things like:
su -c "ls -l; read -p 'Hit return to exit: '; exit"
It's probably best to put double quotes around the command and use
single quotes inside it. Apparently ShellExecuteEx() requires
double quotes to be entered in triplicate:
su -c 'HELLO="""hello world"""'
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Provide an implementation of readlink(2) based on code from Git
for Windows. This version only supports symbolic links, not
mount points, as the latter seem to work well enough as-is.
With this change the ls and stat applets can display the targets
of symbolic links. The readlink applet has been enabled in the
default configuration.
|
| |
| |
| |
| |
| | |
Extend stat(2) so it tries to determine whether a file belongs to
the current user or not. If not it's said to belong to root.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
BusyBox's dpkg is marginally more useful than rpm because it maintains
package status.
Run the following commands to initialise the filesystem:
mkdir -p /var/lib/dpkg/info
touch /var/lib/dpkg/status
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The manifest included here wasn't effective in telling Windows
about version compatibility. Use the default manifest provided
by MinGW-w64 instead.
On Fedora this requires installing the mingw32-windows-default-manifest
and/or mingw64-windows-default-manifest packages.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Move the code to hide the console to a separate function in
win32/mingw.c. Use lazy loading to avoid problems on platforms
where the require APIs aren't supported (PR #70).
Enable console hiding in the default 64-bit configuration.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Modify the WIN32 implementation of stat(2) to fetch inode number,
device id and number of hardlinks. This requires opening a handle
to the target file so it will be slower.
A number of features can be enabled or start to work:
- tar can detect if an archive is being stored in itself;
- find can support the -inum and -links options;
- ls can display inode numbers;
- diff can detect attempts to compare a file with itself;
- du has better support for hardlinked files;
- cp can detect attempts to copy a file over itself.
|
| | |
|
| |
| |
| |
| |
| | |
Continue to use old version of dc; add definition of LONG_BIT from
xopen_lim.h.
|
| |
| |
| |
| |
| | |
Source imported from https://github.com/win-iconv/win-iconv and
modified to build in busybox-w32.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since getpwent isn't implemented for WIN32 there's no point in
enabling FEATURE_USERNAME_COMPLETION.
Use case-insensitive comparisons when matching filenames.
The code to exclude non-executables when tab completing executables
is WIN32-specific and shouldn't omit directories.
|
|\| |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The implementation of realpath(3) is based on code by Stuart Dootson
(studoot on GitHub).
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously
$ HEIGHT=$(ttysize h)
would always return a default height of 24 because stdout wasn't
connected to a console. Now that get_terminal_width_height also
checks stderr the above works.
|
| | |
|
| |
| |
| |
| |
| | |
Include two styles of icon from the GNOME Adwaita theme. These
are enabled by default and add 30 Kbytes to the size of the binary.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow wget to support https URLs. Changes are:
- Add mingw_popen2 which uses a named pipe to allow bidirectional
communication with a child process;
- Modify ssl_client to accept a WIN32 handle instead of a file
descriptor as an argument;
- Allow tls_get_random to open /dev/urandom;
- Using the above changes implement a WIN32 version of spawn_ssl_client
in wget.
This closes GitHub issue #75.
Also, enable authentication in wget.
|
| |
| |
| |
| | |
See issue #97.
|
| |
| |
| |
| |
| | |
SIGWINCH isn't available on Microsoft Windows. Make the use of
SIGWINCH configurable and disable it by default.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use the new low-level support for /dev/zero and /dev/urandom to
allow shred to work in busybox-w32.
The only change required is to close the file before unlinking it,
as Microsoft Windows won't delete an open file.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It turns out that with the new toolchain safe API calls work on all
all platforms. Even the original code from commit fa147bd7e works
on Windows XP when built with the new tools.
- Remove the unsafe environment manipulation via the environ array
- Microsoft's putenv takes a copy of its argument so the string
can be freed
- Rewrite some routines and add more error checking
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The patches to let xargs support parallel operations on Linux/Unix was
contributed and accepted in upstream BusyBox.
To benefit from this on Windows, we have to work quite a bit harder, was
it is pretty hard to emulate the waitpid() semantics on Windows when pid
is -1, i.e. when waiting for any child to exit.
The problem is not so much accumulating the process handles of children
we spawned (we could do that in our own spawn() implementation), but the
fact that waitpid() returns exactly one pid even when multiple children
have exited, retaining the rest of them for subsequent waitpid() calls.
And on Linux/Unix, those pids are reserved even if the processes have
exited, at least for a while, but not on Windows.
And then there is the problem that BusyBox may have spawned *other*
processes, too, not just the ones we care about in xargs -P.
A much more elegant way is to add Windows-specific code to xargs.c that
specifically handles the child processes spawned by xargs. So let's do
this.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Ron Yorston <rmy@pobox.com>
|
| | |
|