[PATCH] Cygwin: add secure_getenv

2019-02-18 Thread Yaakov Selkowitz
Signed-off-by: Yaakov Selkowitz --- This is being used more frequently. Since we don't have Linux capabilities, setuid/setgid is the only condition we have to check. newlib/libc/include/stdlib.h | 3 +++ winsup/cygwin/common.din | 1 + winsup/cygwin/environ.cc

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Houder
On Mon, 18 Feb 2019 13:15:02, Franz Fehringer wrote: > Am 18.02.2019 um 11:42 schrieb Houder: [snip] > > Now show us the output of an antrun script, where the executable > > is C:\Tools\Cygwin\bin\which and its argument: bash > > > > > > > > > gives > > [exec] /usr/bin/bash >

Re: Problem with sshd on W7 with 32bit cygwin 3.0

2019-02-18 Thread Corinna Vinschen
On Feb 18 17:04, Enrico Forestieri wrote: > On Mon, Feb 18, 2019 at 03:11:11PM +0100, Corinna Vinschen wrote: > > > > Two workarounds for now: > > > > - Start sshd as 64 bit Cygwin process. > > - Utilize https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3 > > Thank you. The second

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Thomas Wolff
Am 17.02.2019 um 14:39 schrieb Franz Fehringer: Am 17.02.2019 um 13:53 schrieb Thomas Wolff: Am 17.02.2019 um 12:11 schrieb Franz Fehringer: Hi all (half off topic), I have installed (on a Windows 10 1809 system) both Cygwin and WSL (only the Windows component, no real Linux distribution

Re: ssh key

2019-02-18 Thread Jon Turney
On 10/02/2019 11:18, Kaushik Battu wrote: Name: Battu kaushik. Package: iperf BEGIN SSH2 PUBLIC KEY Done. Thanks for adopting this package and sorry for the delay.

[newlib-cygwin] Cygwin: s4uauth: make sure to fetch correct package id

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a96d68c5bd88080406d4523236449cf43ecebf39 commit a96d68c5bd88080406d4523236449cf43ecebf39 Author: Corinna Vinschen Date: Mon Feb 18 17:59:56 2019 +0100 Cygwin: s4uauth: make sure to fetch correct package id for domain

[newlib-cygwin] Cygwin: s4uauth: convert token to primary token

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=30782f7de4936bbc4c2e666cbaf587039c895fd3 commit 30782f7de4936bbc4c2e666cbaf587039c895fd3 Author: Corinna Vinschen Date: Mon Feb 18 21:45:34 2019 +0100 Cygwin: s4uauth: convert token to primary token Up to Vista

[newlib-cygwin] Cygwin: re-enable create_token for older systems

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e53373bbdb3b8b6d497e7c388138e3ba22fda902 commit e53373bbdb3b8b6d497e7c388138e3ba22fda902 Author: Corinna Vinschen Date: Mon Feb 18 21:00:59 2019 +0100 Cygwin: re-enable create_token for older systems Under WOW64 on 64

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Franz Fehringer
Am 18.02.2019 um 17:20 schrieb Houder: > On Mon, 18 Feb 2019 14:39:11, Franz Fehringer wrote: >> Am 18.02.2019 um 14:07 schrieb Houder: >>> On Mon, 18 Feb 2019 13:15:02, Franz Fehringer wrote: > [snip] > gives [exec] /usr/bin/bash

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Franz Fehringer
Am 18.02.2019 um 17:20 schrieb Houder: > On Mon, 18 Feb 2019 14:39:11, Franz Fehringer wrote: >> Am 18.02.2019 um 14:07 schrieb Houder: >>> On Mon, 18 Feb 2019 13:15:02, Franz Fehringer wrote: > [snip] > gives [exec] /usr/bin/bash

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Houder
On Mon, 18 Feb 2019 14:39:11, Franz Fehringer wrote: > Am 18.02.2019 um 14:07 schrieb Houder: > > On Mon, 18 Feb 2019 13:15:02, Franz Fehringer wrote: [snip] > >> > >> > >> > >> > >> > >> > >> > >> gives > >> > >> [exec] /usr/bin/bash > >> [exec] W i n d o w s S u b s y s t e m f

Re: Problem with sshd on W7 with 32bit cygwin 3.0

2019-02-18 Thread Enrico Forestieri
On Mon, Feb 18, 2019 at 03:11:11PM +0100, Corinna Vinschen wrote: > > Two workarounds for now: > > - Start sshd as 64 bit Cygwin process. > - Utilize https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3 Thank you. The second method above worked. This is a private network, so that is Ok.

Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Corinna Vinschen
On Feb 18 15:45, Michael Haubenwallner wrote: > On 2/18/19 2:15 PM, Corinna Vinschen wrote: > > You have two modes for input and three for output: > > > > - input O_BINARY -> only \n > > - input O_TEXT-> \n and \r\n > > > > - output 0-> generates \n or \r\n depending on mount mode >

Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Michael Haubenwallner
On 2/18/19 2:15 PM, Corinna Vinschen wrote: > On Feb 18 12:47, Michael Haubenwallner wrote: >> On 2/18/19 11:26 AM, Corinna Vinschen wrote: >>> On Feb 18 10:40, Michael Haubenwallner wrote: On 2/16/19 6:43 PM, Corinna Vinschen wrote: > I really miss the problem you're trying to solve

Re: [ANNOUNCEMENT] Cygwin 3.0.0-1

2019-02-18 Thread Corinna Vinschen
On Feb 18 14:01, Andrey Repin wrote: > Greetings, Corinna Vinschen! > > >> > >> TYPE "%SystemRoot%\win.ini" | diff -u "%SystemRoot%\win.ini" - > >> > > >> > > I'm baffled. diff calls fstat on descriptor 0. fstat returns > >> > > with st_mode set to S_IFIFO | S_IRUSR, so it *knows* descriptor >

Re: fixup_mmaps_after_fork failure with cygwin-3.0.0

2019-02-18 Thread Corinna Vinschen
On Feb 18 14:28, Ken Brown wrote: > On 2/18/2019 5:10 AM, Corinna Vinschen wrote: > PROCESS_VM_OPERATION has to be specified additionally, not replacing > PROCESS_QUERY_{LIMITED_}INFORMATION. Sorry if that wasn't clear. > >>> > >>> Success: Simply adding PROCESS_VM_OPERATION to the

Re: fixup_mmaps_after_fork failure with cygwin-3.0.0

2019-02-18 Thread Ken Brown
On 2/18/2019 5:10 AM, Corinna Vinschen wrote: > On Feb 17 17:39, Corinna Vinschen wrote: >> On Feb 17 16:34, Ken Brown wrote: >>> On 2/17/2019 10:07 AM, Corinna Vinschen wrote: On Feb 17 14:56, Ken Brown wrote: > On 2/17/2019 4:13 AM, Corinna Vinschen wrote: >>> If I may place a bet,

Re: Problem with sshd on W7 with 32bit cygwin 3.0

2019-02-18 Thread Corinna Vinschen
On Feb 18 11:58, Enrico Forestieri wrote: > After upgrading to cygwin 3.0.0 (32bit version) on W7 64bit, it is > not possible to connect using ssh. The returned error is something > like "Connection closed by x.x.x.x port 22". > > I also tried the 2019-02-18 snapshot without success. > However,

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Franz Fehringer
Am 18.02.2019 um 14:07 schrieb Houder: > On Mon, 18 Feb 2019 13:15:02, Franz Fehringer wrote: >> Am 18.02.2019 um 11:42 schrieb Houder: > [snip] > >>> Now show us the output of an antrun script, where the executable >>> is C:\Tools\Cygwin\bin\which and its argument: bash >>> >>> Henri >>> >>> >>

Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Corinna Vinschen
On Feb 18 12:47, Michael Haubenwallner wrote: > On 2/18/19 11:26 AM, Corinna Vinschen wrote: > > On Feb 18 10:40, Michael Haubenwallner wrote: > >> On 2/16/19 6:43 PM, Corinna Vinschen wrote: > >>> I really miss the problem you're trying to solve here. Why should an > >>> application setting

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Houder
On Mon, 18 Feb 2019 13:15:02, Franz Fehringer wrote: > Am 18.02.2019 um 11:42 schrieb Houder: [snip] > > Now show us the output of an antrun script, where the executable > > is C:\Tools\Cygwin\bin\which and its argument: bash > > > > Henri > > > > > > > > > > > > > gives > >

Re: portable use of dos2unix WAS: Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Jeffrey Walton
On Mon, Feb 18, 2019 at 5:01 AM Michael Haubenwallner wrote: > > On 2/15/19 10:00 PM, Corinna Vinschen wrote: > > On Feb 15 20:33, Michael Haubenwallner wrote: > >> On 2/15/19 7:35 PM, Andrey Repin wrote: > >>> I have a different question though. The commands you presented in the OP > >>> look

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Franz Fehringer
Am 18.02.2019 um 11:42 schrieb Houder: > On Mon, 18 Feb 2019 10:25:42, Franz Fehringer wrote: > > in the antrun block gives > > C:\Projekte\dev\bin\gmake41;\ > C:\Tools\VisualStudio\2017\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64;\ > C:\Tools\VisualStudio\2017\VC\VCPackages;\ >

Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Michael Haubenwallner
On 2/18/19 11:26 AM, Corinna Vinschen wrote: > On Feb 18 10:40, Michael Haubenwallner wrote: >> On 2/16/19 6:43 PM, Corinna Vinschen wrote: >>> I really miss the problem you're trying to solve here. Why should an >>> application setting O_BINARY explicitely revert this decision on the >>> same

Re: [ANNOUNCEMENT] Cygwin 3.0.0-1

2019-02-18 Thread Houder
On Mon, 18 Feb 2019 14:01:40, Andrey Repin wrote: [snip] > The snapshot only contains a lonely cygwin1.dll. You have to download the tar(.xz) file ... See faq for further details. Henri -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/

Re: [ANNOUNCEMENT] Cygwin 3.0.0-1

2019-02-18 Thread Andrey Repin
Greetings, Corinna Vinschen! >> > >> TYPE "%SystemRoot%\win.ini" | diff -u "%SystemRoot%\win.ini" - >> > >> > > I'm baffled. diff calls fstat on descriptor 0. fstat returns >> > > with st_mode set to S_IFIFO | S_IRUSR, so it *knows* descriptor >> > > 0 is a pipe and thus not seekable.

Problem with sshd on W7 with 32bit cygwin 3.0

2019-02-18 Thread Enrico Forestieri
After upgrading to cygwin 3.0.0 (32bit version) on W7 64bit, it is not possible to connect using ssh. The returned error is something like "Connection closed by x.x.x.x port 22". I also tried the 2019-02-18 snapshot without success. However, simply downgrading to 2.11.2 fixes the issue. This

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Houder
On Mon, 18 Feb 2019 10:25:42, Franz Fehringer wrote: in the antrun block gives C:\Projekte\dev\bin\gmake41;\ C:\Tools\VisualStudio\2017\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64;\ C:\Tools\VisualStudio\2017\VC\VCPackages;\ C:\Tools\VisualStudio\2017\MSBuild\15.0\bin\Roslyn;\

Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Corinna Vinschen
On Feb 18 10:40, Michael Haubenwallner wrote: > On 2/16/19 6:43 PM, Corinna Vinschen wrote: > > I really miss the problem you're trying to solve here. Why should an > > application setting O_BINARY explicitely revert this decision on the > > same file descriptor? That doesn't make sense. > >

Re: portable use of dos2unix WAS: Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Corinna Vinschen
On Feb 18 11:01, Michael Haubenwallner wrote: > On 2/15/19 10:00 PM, Corinna Vinschen wrote: > > On Feb 15 20:33, Michael Haubenwallner wrote: > >> On 2/15/19 7:35 PM, Andrey Repin wrote: > >>> I have a different question though. The commands you presented in the OP > >>> look like you aren't

Re: fixup_mmaps_after_fork failure with cygwin-3.0.0

2019-02-18 Thread Corinna Vinschen
On Feb 17 17:39, Corinna Vinschen wrote: > On Feb 17 16:34, Ken Brown wrote: > > On 2/17/2019 10:07 AM, Corinna Vinschen wrote: > > > On Feb 17 14:56, Ken Brown wrote: > > >> On 2/17/2019 4:13 AM, Corinna Vinschen wrote: > > If I may place a bet, please try to replace > >

Re: [ANNOUNCEMENT] Cygwin 3.0.0-1

2019-02-18 Thread Corinna Vinschen
On Feb 18 09:28, Corinna Vinschen wrote: > On Feb 17 20:07, Andrey Repin wrote: > > Greetings, Corinna Vinschen! > > > > > On Feb 17 18:28, Andrey Repin wrote: > > >> Greetings, Corinna Vinschen! > > >> > > >> > I uploaded a new Cygwin release 3.0.0-1. > > >> > > >> The redirection issue I

[newlib-cygwin] CYgwin: bump API minor for MOUNT_BINARY -> MOUNT_TEXT change

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=959077ac0a6d03630e1df7cfcc6bdc602c47c0b2 commit 959077ac0a6d03630e1df7cfcc6bdc602c47c0b2 Author: Corinna Vinschen Date: Mon Feb 18 11:04:38 2019 +0100 CYgwin: bump API minor for MOUNT_BINARY -> MOUNT_TEXT change

[newlib-cygwin] Cygwin: utils: MOUNT_BINARY -> MOUNT_TEXT

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=26e0b37ed06c78926f1e1ee1e589b214a3813432 commit 26e0b37ed06c78926f1e1ee1e589b214a3813432 Author: Corinna Vinschen Date: Mon Feb 18 11:00:06 2019 +0100 Cygwin: utils: MOUNT_BINARY -> MOUNT_TEXT Signed-off-by: Corinna

Re: portable use of dos2unix WAS: Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Michael Haubenwallner
On 2/15/19 10:00 PM, Corinna Vinschen wrote: > On Feb 15 20:33, Michael Haubenwallner wrote: >> On 2/15/19 7:35 PM, Andrey Repin wrote: >>> I have a different question though. The commands you presented in the OP >>> look like you aren't using Cygwin-suppied OpenSSL binary. >> >> This is true: The

[newlib-cygwin] Cygwin: mount: define binary mount as default

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=367c1ae16185e7a81aea5bcc2388e4a7a473c92e commit 367c1ae16185e7a81aea5bcc2388e4a7a473c92e Author: Corinna Vinschen Date: Mon Feb 18 10:12:07 2019 +0100 Cygwin: mount: define binary mount as default Commit

[newlib-cygwin] Revert "Cygwin: passwd/group: allow specifying "." as local computername"

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9883959f083d13ce9991d2162fcf5fee1613478d commit 9883959f083d13ce9991d2162fcf5fee1613478d Author: Corinna Vinschen Date: Mon Feb 18 10:13:35 2019 +0100 Revert "Cygwin: passwd/group: allow specifying "." as local computername"

[newlib-cygwin] Cygwin: utils: kill: revert erroneously removed optind correction

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5e6ce1cfb212a6dd71790933186275081cffe3c3 commit 5e6ce1cfb212a6dd71790933186275081cffe3c3 Author: Corinna Vinschen Date: Sun Feb 17 22:59:36 2019 +0100 Cygwin: utils: kill: revert erroneously removed optind correction

[newlib-cygwin] Cygwin: mount: remove unused method mount_info::set_flags_from_win32_path

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f76c8519ac662e244ab4c1c14d9f809c08e384b4 commit f76c8519ac662e244ab4c1c14d9f809c08e384b4 Author: Corinna Vinschen Date: Mon Feb 18 10:03:19 2019 +0100 Cygwin: mount: remove unused method mount_info::set_flags_from_win32_path

[newlib-cygwin] Cygwin: fork: add PROCESS_VM_OPERATION to child process permissions

2019-02-18 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7e671e7578c9ab8a1144a10c1187b7ced984 commit 7e671e7578c9ab8a1144a10c1187b7ced984 Author: Corinna Vinschen Date: Sun Feb 17 22:51:21 2019 +0100 Cygwin: fork: add PROCESS_VM_OPERATION to child process permissions

Re: textmode for stdout, what is "correct" now?

2019-02-18 Thread Michael Haubenwallner
On 2/16/19 6:43 PM, Corinna Vinschen wrote: > On Feb 16 18:13, Michael Haubenwallner wrote: >> On 2/16/19 10:38 AM, Corinna Vinschen wrote: >>> setmode(fd, O_BINARY) works on Cygwin. >> >> Well... true. >> >> What I'm trying to say is that restoring the *default* mode is currently >> broken,

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Franz Fehringer
Am 18.02.2019 um 00:00 schrieb Andrey Repin: > Greetings, Franz Fehringer! > >> Am 17.02.2019 um 20:09 schrieb Csaba Ráduly: >>> On 17/02/2019 12:11, Franz Fehringer wrote: Hi all (half off topic), I have installed (on a Windows 10 1809 system) both Cygwin and WSL (only the

Re: antrun versus wsl versus cygwin

2019-02-18 Thread Franz Fehringer
Am 17.02.2019 um 15:14 schrieb LRN: > On 17.02.2019 14:11, Franz Fehringer wrote: >> Hi all (half off topic), >> >> I have installed (on a Windows 10 1809 system) both Cygwin and WSL (only >> the Windows component, no real Linux distribution yet). >> This scenario gives me a strange problem with

Re: Windows to Cygwin username mapping: Domain before local account when duplicate name?

2019-02-18 Thread Corinna Vinschen
On Feb 16 18:40, Corinna Vinschen wrote: > On Feb 16 09:15, Brian Inglis wrote: > > On 2019-02-16 08:33, Corinna Vinschen wrote: > > > On Feb 16 08:09, Brian Inglis wrote: > > >> On 2019-02-16 02:45, Corinna Vinschen wrote: > > >>> On Feb 15 14:51, Bill Stewart wrote: > > On Fri, Feb 15, 2019

Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.2

2019-02-18 Thread Corinna Vinschen
On Feb 17 10:48, Brian Inglis wrote: > On 2019-01-30 13:29, Corinna Vinschen wrote: > > We also have to make sure we're not breaking scripts, especially > > autoconf etc., so on forth thought, I'll rather stick to the current > > format. > > I have zero problems with your previous considerations

Re: [ANNOUNCEMENT] Cygwin 3.0.0-1

2019-02-18 Thread Corinna Vinschen
On Feb 17 20:07, Andrey Repin wrote: > Greetings, Corinna Vinschen! > > > On Feb 17 18:28, Andrey Repin wrote: > >> Greetings, Corinna Vinschen! > >> > >> > I uploaded a new Cygwin release 3.0.0-1. > >> > >> The redirection issue I mentioned for 3.0-0.9 is still happens. > >> And I see the STC