Commit Graph

5 Commits

Author SHA1 Message Date
Yaakov Selkowitz a62b29bfec Cygwin: document secure_getenv
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2019-02-19 14:34:18 -06:00
Corinna Vinschen e53373bbdb Cygwin: re-enable create_token for older systems
Under WOW64 on 64 bit Windows 7, MsV1_0S4ULogon appears to be
unimplemented, probably under Vista as well.  Re-enable
create_token method, to allow basic seteuid on W7 WOW64 and
Vista as well.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-18 21:00:59 +01:00
Corinna Vinschen 367c1ae161 Cygwin: mount: define binary mount as default
Commit c1023ee353 changed the way
path_conv::binmode() works.  Rather than returning three states,
O_BINARY, O_TEXT, 0, it only returned 2 states, O_BINARY, O_TEXT.  Since
mounts are only binary if they are explicitely mounted binary by setting
the MOUNT_BINARY flag, textmode is default.

This introduced a new bug.  When inheriting stdio HANDLEs from native
Windows processes, the fhandler and its path_conv are created from a
device struct only.  None of the path or mount flags get set this way.
So the mount flags are 0 and path_conv::binmode() returned 0.

After the path_conv::binmode() change it returned O_TEXT since, as
explained above, the default mount mode is textmode.

Rather than just enforcing binary mode for path_conv's created from
device structs, this patch changes the default mount mode to binary:

Replace MOUNT_BINARY flag with MOUNT_TEXT flag with opposite meaning.
Drop all explicit setting of MOUNT_BINARY.  Drop local set_flags
function, it doesn't add any value.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-18 10:26:53 +01:00
Corinna Vinschen 5e6ce1cfb2 Cygwin: utils: kill: revert erroneously removed optind correction
When recognizing a negative pid, optind is off by one.  The
code correcting this has been erroneously removed by commit
8de660271f.  Revert that.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-18 10:22:37 +01:00
Corinna Vinschen 7e671e7578 Cygwin: fork: add PROCESS_VM_OPERATION to child process permissions
...on parent process.  This is required for successful mmap propagation.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-18 10:19:44 +01:00