Re: Get Cygwin home directory path for current user

2019-02-15 Thread L A Walsh
On 2/14/2019 3:57 PM, Vince Rice wrote: >> On Feb 14, 2019, at 5:41 PM, Bill Stewart wrote: >> >> (?) I understand that the shell does ~ expansion >> > > It would not appear that you do. You asked why a Cygwin shell would be a > prerequisite. > Vince, I think What Bill

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

2019-02-15 Thread Jeffrey Walton
On Thu, Feb 14, 2019 at 10:23 AM Michael Haubenwallner wrote: > > so I find myself struggling with textmode versus binmode for stdio again. > > Running the openssl command (from within the apps/ build directory here) does > yield different results regarding carriage return depending on the

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

2019-02-15 Thread Andrey Repin
Greetings, Bill Stewart! >> What is a "typical" order?!? >> >> If you login locally to a domain member machine the default domain is >> the logon domain of this machine. If that's not what you want you have >> to choose the logon domain of your account explicitely, even if it's the >> local

Re: Get Cygwin home directory path for current user

2019-02-15 Thread Andrey Repin
Greetings, Doug Henderson! >> >> Greetings, Bill Stewart! >> >> >> Setup your system to use %USERPROFILE% as $HOME and forget this problem >> >> altogether. >> >> For interoperability's sake! (q) >> >> > That won't work, because Cygwin $HOME can be different from the >> > USERPROFILE environment

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

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 2:32 PM Corinna Vinschen wrote: > What is a "typical" order?!? > > If you login locally to a domain member machine the default domain is > the logon domain of this machine. If that's not what you want you have > to choose the logon domain of your account explicitely, even

Re: Get Cygwin home directory path for current user

2019-02-15 Thread Doug Henderson
On Fri, 15 Feb 2019 at 13:35, Andrey Repin wrote: > > Greetings, Bill Stewart! > > >> Setup your system to use %USERPROFILE% as $HOME and forget this problem > >> altogether. > >> For interoperability's sake! (q) > > > That won't work, because Cygwin $HOME can be different from the > >

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

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 2:38 PM Brian Ingliswrote: > Windows normally allows "." to be used to refer to the local machine name in a > domain context - can anyone confirm or deny whether this works in Cygwin or > with > getent? AFAICT, the "." shortcut does not work in Cygwin. Regards, Bill

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

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 2:32 PM Corinna Vinschen wrote: > > The section that starts with "Let's discuss the SID<=>uid/gid mapping > > first. Here's how it works." states this order: > > It doesn't state an order. It describes the mapping from SID to > uid/gid, and there's *no* order at all to

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

2019-02-15 Thread Brian Inglis
On 2019-02-15 13:59, Bill Stewart wrote: > On Fri, Feb 15, 2019 at 1:43 PM Corinna Vinschen wrote: >> More specific as the original text? I'm hard pressed to accomplish >> that. Take note of the "domain member machine" property. > I think I see the problem. The list I posted (above the one you

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

2019-02-15 Thread Corinna Vinschen
On Feb 15 13:59, Bill Stewart wrote: > On Fri, Feb 15, 2019 at 1:43 PM Corinna Vinschen wrote: > I think I see the problem. The list I posted (above the one you are > apparently referring to) has the search in a different order. I'm not only "apparently referring" to that list, I pasted it

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

2019-02-15 Thread Brian Inglis
On 2019-02-15 12:33, Michael Haubenwallner wrote: > This is true: The Cygwin distro does provide openssl-1.0.2p, but I'm > building the *portable* Gentoo Prefix distro on Cygwin, with openssl-1.1.1a > already. > But whenever the Cygwin distro would bump to openssl-1.1, the same problem > would

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

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 1:43 PM Corinna Vinschen wrote: > More specific as the original text? I'm hard pressed to accomplish > that. Take note of the "domain member machine" property. I think I see the problem. The list I posted (above the one you are apparently referring to) has the search in

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

2019-02-15 Thread Corinna Vinschen
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 Cygwin distro does provide openssl-1.0.2p, but

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

2019-02-15 Thread Andrey Repin
Greetings, Michael Haubenwallner! >> 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 Cygwin distro does provide openssl-1.0.2p, but I'm building > the *portable* Gentoo Prefix distro on

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

2019-02-15 Thread Andrey Repin
Greetings, Bill Stewart! > On Fri, Feb 15, 2019 at 9:38 AM Corinna Vinschen wrote: >> There's a documented ruleset which is strictly followed >> https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-how: > From that reference, we have the following order: [...crap skipped...] > What am I

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

2019-02-15 Thread Corinna Vinschen
On Feb 15 13:36, Bill Stewart wrote: > On Fri, Feb 15, 2019 at 1:29 PM Corinna Vinschen wrote: > > > you didn't really read it. Try again. > > Can you be more specific? More specific as the original text? I'm hard pressed to accomplish that. Take note of the "domain member machine"

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

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 1:29 PM Corinna Vinschen wrote: > you didn't really read it. Try again. Can you be more specific? Bill -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html

Re: Get Cygwin home directory path for current user

2019-02-15 Thread Andrey Repin
Greetings, Bill Stewart! >> Setup your system to use %USERPROFILE% as $HOME and forget this problem >> altogether. >> For interoperability's sake! (q) > That won't work, because Cygwin $HOME can be different from the > USERPROFILE environment variable on Windows. Make. It. The. Same. Tell,

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

2019-02-15 Thread Corinna Vinschen
On Feb 15 19:07, Michael Haubenwallner wrote: > On 2/15/19 1:48 PM, Corinna Vinschen wrote: > > On Feb 15 13:03, Michael Haubenwallner wrote: > >> On 2/15/19 11:22 AM, Corinna Vinschen wrote: > >>> On Feb 15 08:56, Michael Haubenwallner wrote: > On 2/14/19 5:20 PM, Corinna Vinschen wrote: >

Re: Domain user picked Instead of SAM user

2019-02-15 Thread Corinna Vinschen
On Feb 15 12:25, Bill Stewart wrote: > See https://cygwin.com/ml/cygwin/2019-02/msg00184.html > > cygcheck.out attached. As expected on a domain meber machine. Nothing to do here. Corinna -- Corinna Vinschen Cygwin Maintainer signature.asc Description: PGP signature

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

2019-02-15 Thread Corinna Vinschen
On Feb 15 12:14, Bill Stewart wrote: > On Fri, Feb 15, 2019 at 9:38 AM Corinna Vinschen wrote: > > > There's a documented ruleset which is strictly followed > > https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-how: > > >From that reference, we have the following order: > > * Well-known

Re: [ANNOUNCEMENT] Updated: setup (2.895)

2019-02-15 Thread Marco Atzeri
Am 15.02.2019 um 18:10 schrieb Brian Inglis: On 2019-02-14 11:51, Marco Atzeri wrote: Am 16.12.2018 um 15:51 schrieb Jon Turney: A new version of Setup (2.895) has been uploaded to: When using a FTP mirror server, setup pops up error message   550 failed to change directory and logs

Re: Get Cygwin home directory path for current user

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 4:50 AM Andrey Repin wrote: > Not as good as bash. Just so you know. We'll just agree to disagree on that (particularly on Windows). > Setup your system to use %USERPROFILE% as $HOME and forget this problem > altogether. > For interoperability's sake! (q) That won't

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

2019-02-15 Thread Michael Haubenwallner
Hi Andrey, On 2/15/19 7:35 PM, Andrey Repin wrote: > Greetings, Michael Haubenwallner! > >> On 2/15/19 1:45 PM, Andrey Repin wrote: >>> Greetings, Michael Haubenwallner! >>> > > For scripting, d2u should help. >>> Plus, to be portable: type d2u >/dev/null 2>&1 || d2u() { cat; } >>>

Re: Get Cygwin home directory path for current user

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 9:14 AM Takashi Yano wrote: > If you don't want to use "shell", you can: > c:/cygwin/bin/cygpath -w $(c:/cygwin/bin/getent passwd $env:USERNAME | > c:/cygwin/bin/cut -d: -f6) > but I'm not sure if you think this is "awkward" as well. Why cut if you are already using

Domain user picked Instead of SAM user

2019-02-15 Thread Bill Stewart
See https://cygwin.com/ml/cygwin/2019-02/msg00184.html cygcheck.out attached. Regards, Bill cygcheck.out Description: Binary data -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html

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

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 9:38 AM Corinna Vinschen wrote: > There's a documented ruleset which is strictly followed > https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-how: >From that reference, we have the following order: * Well-known SIDs in the NT_AUTHORITY domain of the S-1-5-RID

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

2019-02-15 Thread Andrey Repin
Greetings, Michael Haubenwallner! > On 2/15/19 1:45 PM, Andrey Repin wrote: >> Greetings, Michael Haubenwallner! >> For scripting, d2u should help. >> >>> Plus, to be portable: type d2u >/dev/null 2>&1 || d2u() { cat; } >> >> _d2u="$( which d2u 2> /dev/null || echo cat )" > To be

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

2019-02-15 Thread Michael Haubenwallner
Hi Andrey, On 2/15/19 1:45 PM, Andrey Repin wrote: > Greetings, Michael Haubenwallner! > >>> >>> For scripting, d2u should help. > >> Plus, to be portable: type d2u >/dev/null 2>&1 || d2u() { cat; } > > _d2u="$( which d2u 2> /dev/null || echo cat )" To be honest, this is less portable for

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

2019-02-15 Thread Michael Haubenwallner
On 2/15/19 1:48 PM, Corinna Vinschen wrote: > On Feb 15 13:03, Michael Haubenwallner wrote: >> On 2/15/19 11:22 AM, Corinna Vinschen wrote: >>> On Feb 15 08:56, Michael Haubenwallner wrote: On 2/14/19 5:20 PM, Corinna Vinschen wrote: > On Feb 14 16:23, Michael Haubenwallner wrote: >>

Re: [ANNOUNCEMENT] Updated: setup (2.895)

2019-02-15 Thread Brian Inglis
On 2019-02-14 11:51, Marco Atzeri wrote: > Am 16.12.2018 um 15:51 schrieb Jon Turney: >> A new version of Setup (2.895) has been uploaded to: > When using a FTP mirror server, setup pops up > error message >   550 failed to change directory > and logs > 2019/02/14 19:43:44 mbox Internet Error: 550

Re: Get Cygwin home directory path for current user

2019-02-15 Thread Brian Inglis
On 2019-02-14 17:03, Bill Stewart wrote: > On Thu, Feb 14, 2019 at 4:57 PM Vince Rice wrote: >> Here, you say "forget about the ~ character." We can't "forget" about the >> tilde. This whole >> conversation is about the tilde, specifically tilde expansion. > Eric Blake seems to have understood

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

2019-02-15 Thread Corinna Vinschen
On Feb 15 08:34, Bill Stewart wrote: > On Fri, Feb 15, 2019 at 2:32 AM Sam Edge (Cygwin) wrote: > > > https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-how explains > > in more detail. > > I had already read that, and it seems to indicate that it asks the > local machine first, but that

Re: Get Cygwin home directory path for current user

2019-02-15 Thread Takashi Yano
On Thu, 14 Feb 2019 16:41:11 -0700 Bill Stewart wrote: > (?) I understand that the shell does ~ expansion. I am asking for a > way to get that particular path (forget about the ~ character for the > time being) without needing to invoke a Cygwin shell in the first > place. (That was the whole

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

2019-02-15 Thread Andrey Repin
Greetings, Bill Stewart! > On Fri, Feb 15, 2019 at 2:32 AM Sam Edge (Cygwin) wrote: >> https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-how explains >> in more detail. > I had already read that, and it seems to indicate that it asks the > local machine first, but that doesn't seem to

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

2019-02-15 Thread Brian Inglis
On 2019-02-15 08:34, Bill Stewart wrote: > On Fri, Feb 15, 2019 at 2:32 AM Sam Edge wrote: >> https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-how explains >> in more detail. > I had already read that, and it seems to indicate that it asks the > local machine first, but that doesn't seem

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

2019-02-15 Thread Bill Stewart
On Fri, Feb 15, 2019 at 2:32 AM Sam Edge (Cygwin) wrote: > https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-how explains > in more detail. I had already read that, and it seems to indicate that it asks the local machine first, but that doesn't seem to be happening when there's a

RE: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> No, 30 seconds is a hard system timeout in which a service must reply with > an appropriate control message to let services.exe know it is ready to > continue startup sequence. I don't think there is a hard-coded system timeout, as long as the starting service keeps posting its START_PENDING

Re: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Andrey Repin
Greetings, Corinna Vinschen! > On Feb 15 14:44, Andrey Repin wrote: >> Greetings, Lavrentiev, Anton (NIH/NLM/NCBI) [C]! >> >> > It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time >> > for a service to start, then bails out with a failure. >> >> No, 30 seconds is a hard

Re: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Corinna Vinschen
On Feb 15 14:44, Andrey Repin wrote: > Greetings, Lavrentiev, Anton (NIH/NLM/NCBI) [C]! > > > It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time > > for a service to start, then bails out with a failure. > > No, 30 seconds is a hard system timeout in which a service must

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

2019-02-15 Thread Andrey Repin
Greetings, Michael Haubenwallner! >> >> For scripting, d2u should help. > Plus, to be portable: type d2u >/dev/null 2>&1 || d2u() { cat; } _d2u="$( which d2u 2> /dev/null || echo cat )" if you want to be THAT nice. > So, firsthand I do prefer to avoid that need. +1 -- With best regards,

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

2019-02-15 Thread Corinna Vinschen
On Feb 15 13:03, Michael Haubenwallner wrote: > On 2/15/19 11:22 AM, Corinna Vinschen wrote: > > On Feb 15 08:56, Michael Haubenwallner wrote: > >> On 2/14/19 5:20 PM, Corinna Vinschen wrote: > >>> On Feb 14 16:23, Michael Haubenwallner wrote: > Hi, > [SNIP] > >> Down the line in their

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

2019-02-15 Thread Michael Haubenwallner
On 2/15/19 11:22 AM, Corinna Vinschen wrote: > On Feb 15 08:56, Michael Haubenwallner wrote: >> On 2/14/19 5:20 PM, Corinna Vinschen wrote: >>> On Feb 14 16:23, Michael Haubenwallner wrote: Hi, so I find myself struggling with textmode versus binmode for stdio again.

Re: Get Cygwin home directory path for current user

2019-02-15 Thread Andrey Repin
Greetings, Bill Stewart! >> There is -- use a cygwin shell. As Eric has already explained, expansion is >> the >> shell's responsibility. Powershell doesn't do it. If you want expansion, use >> one >> that does. > So let's consider, for a bit, that not everybody uses a Cygwin shell. > (Hard to

Re: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Andrey Repin
Greetings, Lavrentiev, Anton (NIH/NLM/NCBI) [C]! > It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time > for a service to start, then bails out with a failure. No, 30 seconds is a hard system timeout in which a service must reply with an appropriate control message to let

Re: Cygserver functionality in UG

2019-02-15 Thread Corinna Vinschen
On Feb 15 10:04, Sam Edge (Cygwin) wrote: > Hi Cygwin UG maintainers. > > Might it not be a good idea to mention the cygserver ntsec caching > functionality in the section > https://cygwin.com/cygwin-ug-net/using-cygserver.html#what-is-cygserver > with a cross-reference? > > I'd submit a patch

Re: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Corinna Vinschen
On Feb 14 20:47, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: > Hi all, > > It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time > for a service to start, then bails > out with a failure. > > It would be quite useful (in certain situations) to have a command-line

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

2019-02-15 Thread Corinna Vinschen
On Feb 15 08:56, Michael Haubenwallner wrote: > On 2/14/19 5:20 PM, Corinna Vinschen wrote: > > On Feb 14 16:23, Michael Haubenwallner wrote: > >> Hi, > >> > >> so I find myself struggling with textmode versus binmode for stdio again. > >> > >> Running the openssl command (from within the apps/

Cygserver functionality in UG

2019-02-15 Thread Sam Edge (Cygwin)
Hi Cygwin UG maintainers. Might it not be a good idea to mention the cygserver ntsec caching functionality in the section https://cygwin.com/cygwin-ug-net/using-cygserver.html#what-is-cygserver with a cross-reference? I'd submit a patch but I'm a bit busy this morning and am not familiar with

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

2019-02-15 Thread Sam Edge (Cygwin)
On 14/02/2019 23:47, Bill Stewart wrote: > Consider the case where you have a local account and a domain account > with the same username. > > If you supply just the username to Windows without an authority name, > Windows returns the local account. To get the domain account, you'd > have to