- Remove another unfortunate amalgamation: Mount flags (MOUNT_xxx)
are converted to path_types (PATH_xxx) and mixed with non-mount
path_types flags in the same storage, leading to a tangled,
pell-mell usage of mount flags and path flags in path_conv and
symlink_info.
- There's also the case of PC_NONULLEMPTY. It's used in exactly
one place with a path_conv constructor only used in this single
place, just to override the automatic PC_NULLEMPTY addition
when calling the other path_conv constructors. Crazily,
PC_NONULLEMPTY is a define, no path_types flag, despite its
name.
- It doesn't help that the binary flag exists as mount and path
flag, while the text flag only exists as path flag. This leads
to mount code using path flags to set text/binary. Very confusing
is the fact that a text mount/path flag is not actually required;
the mount code sets the text flag on non binary mounts anyway, so
there are only two states. However, to puzzle people a bit more,
path_conv::binary wrongly implies there's a third, non-binary/non-text
state.
Clean up this mess:
- Store path flags separately from mount flags in path_conv and
symlink_info classes and change all checks and testing inline
methods accordingly.
- Make PC_NONULLEMPTY a simple path_types flag and drop the
redundant path_check constructor.
- Clean up the definition of pathconv_arg, path_types, and mount flags.
Use _BIT expression, newly define in cygwin/bits.h.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Updates to misc files to integrate AIO into the Cygwin source tree.
Much of it has to be done when adding any new syscalls. There are
some updates to limits.h for AIO-specific limits. And some doc mods.
Make getfacl print two colons instead of one after "other" and "mask".
Change the help text for setfacl to indicate that there can be either
one colon or two.
This was called only on filenames in /etc/setup/installed.db, which
are all basenames anyway. Moreover, base wasn't correctly handling
filenames containing colons.
Error messages of regtool can't be read, which are encoded in,
for instance, SHIFT_JIS in Japanese Windows. Fix by using
wide chars instead of multibyte.
Recent versions of gcc are optimizing away the TLS buffer allocated in
main, so we need to tell gcc that it's really used. RtlSecureZeroMemory
accomplishes this while also inlining the memset.
Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Ensure that ldd always stops when the exception is flagged as
non-continuable.
Also arrange for ldd to exit with a non-zero exit code if something went
wrong which prevented us from listing all dynamic dependencies.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
The form data sent to the server should be application/x-www-form-urlencoded
This replaces spaces with '+' before being RFC 1738 encoded, so a literal
'+' must be %-encoded also.
See https://cygwin.com/ml/cygwin/2014-01/msg00287.html et seq.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This not only simplifies the code but also fixes potential
memory corruption
Fixes Coverity CID 66952
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Update the getconf utility to support the new flag as well as
_PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY. These were previously
unsupported, probably as an oversight.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The new functionality to set the thread name for debugging purposes
creates exception debugging events. These are printed out when running
strace. Since these exceptions have nothing to do with real exceptions
but are, like breakpoint execptions, expected and non-fatal, don't print
exception info for them.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
On Windows 8.1 and later, the NetUserChangePassword call apparently
doesn't accept the usual "\\server" string anymore, but requires to
use the "domain" instead, otherwise it emits en error code 1265,
ERROR_DOWNGRADE_DETECTED. Since this is accepted by pre-8.1 as well,
use the domain indiscriminately when calling NetUserChangePassword
from passwd(1).
While at it, do some minor cleanup in passwd.c.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The default UI language returned by GetUserDefaultUILanguage does not
necessarily reflect what the user really wants. E. g., the system could
be en_US, but the desired language is en_CA, without having a CA langpack
installed.
Changing the settings under "Languages" and changing the keyboard layout
is only affecting the so-called "Input language", while what's returned
by GetUserDefaultUILanguage is the "Display language". Changing the
latter requires installing MUI langpacks.
Thus, we introduce a way to fetch the "Input language" using the -i or
--input option.
Also clean up documentation of locale(1).
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
set_entry_point_break() uses GetModuleInformation to fetch the
address of the exe's entry point. However, just as with
lpStartAddress from the CREATE_PROCESS_DEBUG_EVENT event, the
returned address is only computed from the PE file header. It's
not actually the entry point in memory, if the executable is
relocated (ASLR). See
https://msdn.microsoft.com/en-us/library/windows/desktop/ms684229(v=vs.85).aspx
Convert this to using the info from CREATE_PROCESS_DEBUG_EVENT
combined with the offset from the PE file header's AddressOfEntryPoint
to deal with relocation.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
So far ldd terminates the inferior process as soon as some thread
is started. Apparently threads are started from even ntdll.dll
before the main thread of the application is started. As a result
the dll list is cut short since ldd terminates prematurely.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.
Everything else stays under GPLv3+.
New Linking Exception exempts resulting executables from LGPLv3 section 4.
Add CONTRIBUTORS file to keep track of licensing.
Remove 'Copyright Red Hat Inc' comments.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The available specifications obviously differ on 32-bit and 64-bit, as
already handled in <sys/features.h>.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>