Re: DOS namespaces, accessible/walk-able as Admin via Cygwin?

2024-04-21 Thread Bill Stewart via Cygwin
On Sun, Apr 21, 2024 at 5:25 PM Dan Shelton wrote:

On Sat, 20 Apr 2024 at 05:37, Brian Inglis via Cygwin 
> wrote:
> > Under MS Windows you can use Sysinternals WinObj64 to browse the
> hierarchy and
> > objects.
>
> What is that?
>

Perhaps search for "winobj64" ?

https://devblogs.microsoft.com/oldnewthing/20080613-00/?p=21963

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: GetVersionEx() depreciated, what should be used instead for Windows 7/8/10?

2024-03-20 Thread Bill Stewart via Cygwin
On Wed, Mar 20, 2024 at 5:40 AM Christian Franke wrote:

Corinna Vinschen via Cygwin wrote:
>
> > For Cygwin apps, this occured when you built, say, an executable under
> > Windows 8.1 before Windows 10 support was added to the Cygwin toolchain:
> > the manifest linked to the Cygwin executable didn't yet contain a GUID
> > entry for Windows 10 support.
> >
> > In this case, RtlGetVersion returns an OS version 6.3 even when running
> > under the 10.0 kernel.  This behaviour exists back 'til Windows Vista.
>
> Could not reproduce the latter on Win10. I tested with recent Win10 and
> Win11 and also found a Win10 1511 (and Slackware 1.1.2, Win3.1, OS/2,
> ...) in my VM image museum.
>
> Regardless of the exe manifest, RtlGetVersion and RtlGetNtVersionNumbers
> return the correct versions:
> 10.0.22621 (Win11 22H2)
> 10.0.19045 (Win10 22H2)
> 10.0.10586 (Win10 1511)
>
> Without a manifest, GetVersionEx returns:
> 6.2.9200 (Win8)


Thanks for testing. That was my recollection (RtlGetVersion is not subject
to manifesting).

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: GetVersionEx() depreciated, what should be used instead for Windows 7/8/10?

2024-03-19 Thread Bill Stewart via Cygwin
On Tue, Mar 19, 2024 at 10:21 AM Corinna Vinschen wrote:

On Mar 19 09:18, Bill Stewart via Cygwin wrote:
>
> > I'm not sure of the exact scenario that led to the "RtlGetVersion is
> > subject to manifesting" conclusion, but I can't reproduce it.
>
> You have to create an application with an application manifest not
> supporting your OS.
>
> For Cygwin apps, this occured when you built, say, an executable under
> Windows 8.1 before Windows 10 support was added to the Cygwin toolchain:
> the manifest linked to the Cygwin executable didn't yet contain a GUID
> entry for Windows 10 support.
>
> In this case, RtlGetVersion returns an OS version 6.3 even when running
> under the 10.0 kernel.  This behaviour exists back 'til Windows Vista.
>
> Fortunately Microsoft didn't change the required manifest GUID entry
> since the introduction of Windows 10.  Even Windows 11 is still using
> the same GUID.
>

Interesting. Thanks for the clarification!

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: GetVersionEx() depreciated, what should be used instead for Windows 7/8/10?

2024-03-19 Thread Bill Stewart via Cygwin
On Tue, Mar 19, 2024 at 9:01 AM Richard Campbell wrote:

On Tue, Mar 19, 2024 at 9:04 AM Bill Stewart via Cygwin 
> wrote:
>
> > Can you please clarify the circumstances under which the RtlGetVersion
> > function "may not return the correct values"?
>
> "Originally, using RtlGetVersion instead of GetVersionEx was supposed to
> fix the fact that GetVersionInfo returns the wrong kernel version if the
> executable has been built with an old manifest (or none at all), starting
> with Windows 8.1.  Either this never really worked as desired and our
> testing was flawed, or this has been changed again with Windows 10, so
> that RtlGetVersion does the kernel faking twist as well.  Since we're
> only reading the value in the first process in a process tree. the entire
> process tree is running with a wrong OS version information in that case.
>
> Fortunately, the (undocumented) RtlGetNtVersionNumbers function is not
> affected by this nonsense, so we simply override the OS version info
> fields with the correct values now."
>
> https://cygwin.com/git/?p=newlib-cygwin.git;a=commitdiff;h=48511f3d3847c35352d09cded56e25f0c1b22bc9
>

Interesting. I have not yet been able to find a scenario where the
RtlGetVersion function gets "manifested" like GetVersionEx.

I wrote a small Win32 console utility for displaying and testing OS
information (requires Windows Vista/Server 2008 or later):

https://github.com/Bill-Stewart/osinfo

It uses RtlGetVersion, and this function works correctly for me in all
current Windows versions (Windows 10, Server 2016, Windows 11, Server 2019,
Server 2022, etc.).

I'm not sure of the exact scenario that led to the "RtlGetVersion is
subject to manifesting" conclusion, but I can't reproduce it.

I would be interested to know what results the osinfo.exe tool reports in
these scenarios.

Regards,

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: GetVersionEx() depreciated, what should be used instead for Windows 7/8/10?

2024-03-19 Thread Bill Stewart via Cygwin
On Tue, Mar 19, 2024 at 4:21 AM Christian Franke wrote:

Cygwin uses the undocumented RtlGetNtVersionNumbers() from ntdll.dll
> because even RtlGetVersion() may not return the correct values. See
> function wincapc::init()
>
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/wincap.cc
>

Can you please clarify the circumstances under which the RtlGetVersion
function "may not return the correct values"?

(I am not aware of any, hence the question.)

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-02-29 Thread Bill Stewart via Cygwin
On Thu, Feb 29, 2024 at 7:50 AM Andrey Repin wrote:

> (I ask because PowerShell has been a built-in part of the Windows since
> > Windows 7--that's over 14 years ago as I write this.)
>
> Since Windows XP.
>

You must not be remembering correctly. PowerShell wasn't a built-in part of
Windows until Windows 7.

https://serverfault.com/questions/615275/

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: How can I get the group SID for a file in cmd.exe (powershell is not an option)?

2024-02-27 Thread Bill Stewart via Cygwin
On Tue, Feb 27, 2024 at 7:42 AM Cedric Blancher wrote:

How can I get the group SID for a file in cmd.exe (powershell is not an
> option)?
>

Why is PowerShell not an option?

(I ask because PowerShell has been a built-in part of the Windows since
Windows 7--that's over 14 years ago as I write this.)

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Automatic Cygwin installation for CI ?

2023-12-15 Thread Bill Stewart via Cygwin
On Fri, Dec 15, 2023 at 10:07 AM Mainz, Roland  wrote:

Is there any documentation how Cygwin 3.5.0 can be automatically (without
> GUI and user intervention, e.g. via *.bat script) be installed as part of a
> CI (Continuous integration) build environment ?
>

Have you looked at cygwin.com?

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: cmd.exe clone with UNC support?

2023-11-30 Thread Bill Stewart via Cygwin
On Wed, Nov 29, 2023 at 9:51 PM Martin Wege via Cygwin 
wrote:

Is there a cmd.exe clone for Windows which supports UNC paths?
>

No, and this is because cmd.exe already supports UNC paths. I have been
using UNC paths in cmd.exe for many years.

It might help to describe your problem rather than a proposed solution.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-22 Thread Bill Stewart via Cygwin
On Wed, Nov 22, 2023 at 7:53 AM Jose Isaias Cabrera wrote:

I have a new Win11 PC, and I wanted to capture the same Cygwin setup that I
> have in another Win10 PC. I copied the C:\cygwin64 folder from the Win10 pc
> to the Win11 pc, then I downloaded a fresh setup-x86_64.exe from
> cygwin.com to the win11 PC. I ran it and chose "Install from Local
> Directory" and only one shortcut for "Cygwin64 Terminal" was created on the
> desktop. No Cygwin nor Cygwin-X folders were created on the Start menu. The
> original cygwin from the Win10 PC had X installed also.
>

I don't think "Install from Local Directory" means "reproduce same cygwin
installation on a separate computer".

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Fork errors

2023-09-07 Thread Bill Stewart via Cygwin
On Wed, Sep 6, 2023 at 5:32 PM Mark Geisert wrote:

Speculation: The specific exit code 0xC142 may or may not have
> something to do
> with Windows error 142, which is ERROR_BUSY_DRIVE.  I cannot help further
> on this.
>

Correction: The low word of 0xC142 = hex 142 = decimal 322 =
ERROR_DEVICE_NO_RESOURCES ("The target device has insufficient resources to
complete the operation").

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Test for Windows Administrator permissions from Cygwin terminal|script?

2023-08-24 Thread Bill Stewart via Cygwin
On Thu, Aug 24, 2023 at 8:52 AM Bill Stewart wrote:

On Thu, Aug 24, 2023 at 7:01 AM Andrew Schulman wrote:
>
> > How can I find out whether the current Cygwin terminal has
>> > Administrator rights? I want to safeguard our admin scripts with a
>> > simple test and bail out with an error if someone wants to do admin
>> > stuff (say: regtool) without admin privileges.
>>
>>
>> https://superuser.com/questions/660191/how-to-check-if-cygwin-mintty-bash-is-run-as-administrator/874615#874615
>>
>
> This answer may be misleading. For example, when I log on using an account
> that's a member of Administrators, my account is a member of the group, but
> the Administrators group token is not enabled. For example, if I log on as
> a member of the Administrators group and open a PowerShell window, I can
> run the following, and it will output the local Administrators group (there
> will be no output if the account is not a member of Administrators):
>
> PS C:\> whoami /groups /fo csv | ConvertFrom-Csv | Where-Object { $_.SID
> -eq "S-1-5-32-544" }
>
> That is, while it is true that the process is a member of the
> Administrators group, the group isn't enabled, so the process isn't
> actually running with administrative permissions. In Windows-speak we would
> say the process isn't "elevated" ("elevated" = "running with administrative
> permissions"). In other words, logging on as a member of Administrators
> doesn't mean that processes you start are elevated.
>
> IME, what is normally being asked for is whether the current process is
> elevated (i.e., the group is both present and enabled). The usual Windows
> API way to check this is the CheckTokenMembership() function:
>
>
> https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-checktokenmembership
>
> In that reference: "The CheckTokenMembership function simplifies the
> process of determining whether a SID is both present and enabled in an
> access token."
>
> As an example, I wrote a little Windows program called 'elevate' that has
> a '-t' option to test whether the current process is elevated:
>
> https://github.com/Bill-Stewart/elevate
>

To elaborate on the above, the cygwin 'id -G' command looks like it takes
this into account and only outputs enabled group IDs.

I should have checked this before I responded, of course.

In other words, 'id -G' outputs a 544 in its list if the current process is
elevated ("run as administrator"). The 544 won't be in there if the process
is not elevated. I just tested from an elevated PowerShell console:

PS C:\Windows\System32> ((id -G) -split ' ') -contains '544'
True

Sorry for any confusion.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Test for Windows Administrator permissions from Cygwin terminal|script?

2023-08-24 Thread Bill Stewart via Cygwin
On Thu, Aug 24, 2023 at 7:01 AM Andrew Schulman wrote:

> How can I find out whether the current Cygwin terminal has
> > Administrator rights? I want to safeguard our admin scripts with a
> > simple test and bail out with an error if someone wants to do admin
> > stuff (say: regtool) without admin privileges.
>
>
> https://superuser.com/questions/660191/how-to-check-if-cygwin-mintty-bash-is-run-as-administrator/874615#874615
>

This answer may be misleading. For example, when I log on using an account
that's a member of Administrators, my account is a member of the group, but
the Administrators group token is not enabled. For example, if I log on as
a member of the Administrators group and open a PowerShell window, I can
run the following, and it will output the local Administrators group (there
will be no output if the account is not a member of Administrators):

PS C:\> whoami /groups /fo csv | ConvertFrom-Csv | Where-Object { $_.SID
-eq "S-1-5-32-544" }

That is, while it is true that the process is a member of the
Administrators group, the group isn't enabled, so the process isn't
actually running with administrative permissions. In Windows-speak we would
say the process isn't "elevated" ("elevated" = "running with administrative
permissions"). In other words, logging on as a member of Administrators
doesn't mean that processes you start are elevated.

IME, what is normally being asked for is whether the current process is
elevated (i.e., the group is both present and enabled). The usual Windows
API way to check this is the CheckTokenMembership() function:

https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-checktokenmembership

In that reference: "The CheckTokenMembership function simplifies the
process of determining whether a SID is both present and enabled in an
access token."

As an example, I wrote a little Windows program called 'elevate' that has a
'-t' option to test whether the current process is elevated:

https://github.com/Bill-Stewart/elevate

Hope this helps clarify.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Virus Total scan

2023-08-22 Thread Bill Stewart via Cygwin
On Tue, Aug 22, 2023 at 9:00 AM Thomas Schweikle wrote:

It is the address of one of the distribution servers. Since this is not
> "one server", but a cluster of servers, your "suspicious" server shows
> only one thing: those "suspicious" flags are suspicious by themselves:
>
> this particular server ist down since some time and only reports back a
> broken html page telling "Our services aren't available right
> nowWe're working to restore all services as soon as possible.
> Please check back
> soon.06cvkZAA8FvmXFYIOTZ2TS15AJl0/RFVTMzBFREdFMDkxNwBFZGdl"
>
> If this is enough to get flagged as "suspicious" ...
>

Unfortunately yes, nowadays.

I have run into this same problem also because I wrote an installer for an
open source tool. Said tool makes outgoing TCP connections to servers
configured as relays. One of the IP addresses used by one of these relays
was (or is) shared with a "dangerous" service. As a result I had to disable
the relay feature in the installer as a default to (hopefully) reduce the
number false positives.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Test for Windows Administrator permissions from Cygwin terminal|script?

2023-08-19 Thread Bill Stewart via Cygwin
On Sat, Aug 19, 2023 at 2:15 AM ASSI wrote:

Windows really doesn't have a defined notion of what is or is not an
> "administrator".  Each particular definition will be insufficient or
> invalid in certain contexts.
>

There is a definition of administrator in Windows: Your account is a
member, either directly or indirectly, of the Administrators group (SID
1-5-32-544).

With the introduction of User Account Control (UAC) in Windows Vista, if
you log on as a member of this group, processes are normally started with
the Administrators group disabled (i.e, the process is not running as a
member of Administrators). The "run as administrator" action starts a
process with the group enabled. This is commonly referred to as
"elevation." [Side note: As I understand it, one of the reasons UAC was
introduced was made was to break (some?) software developers' habits of
assuming their programs run as administrator, and to choose better data
storage paths, registry paths, etc. See
https://techcommunity.microsoft.com/t5/windows-blog-archive/faq-why-can-8217-t-i-bypass-the-uac-prompt/ba-p/701510
for a nice summary. Also helpful is the current docs on SIDs:
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers
]

On a domain, the Domain Admins group (which has a relative identifier, or
RID, of 512) is by default a member of the Administrators group. The
Administrators group is still there (same SID, S-1-5-32-544), and is called
a "Domain Local Security Group" (i.e., it's a local group that's shared by
all domain controllers.)

Hope this helps clarify.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: fnmatch improvements

2023-07-28 Thread Bill Stewart via Cygwin
On Fri, Jul 28, 2023 at 5:12 AM Corinna Vinschen wrote:

I'm puzzled because I'm an idiot.
>

That's one thing you certainly are not.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: setup 2.926 release candidate - please test

2023-07-26 Thread Bill Stewart via Cygwin
On Fri, Apr 14, 2023 at 9:29 AM Jon Turney wrote:

A new setup release candidate is available at:
>
>   https://cygwin.com/setup/setup-2.926.x86_64.exe (64 bit version)
>   https://cygwin.com/setup/setup-2.926.x86.exe(32 bit version)
>
> Please test, and report any problems here.
>
> ...
>
> - Fix reinstall via command line (thanks to Bill Stewart for helping to
> identify this is a regression in 2.919)
>Addresses: https://cygwin.com/pipermail/cygwin/2023-March/253352.html
>

 (amended subject line)

Seems to be working in my testing. Thank you!

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Setup: How to automate source download for packages already installed?

2023-03-28 Thread Bill Stewart via Cygwin
On Mon, Mar 27, 2023 at 2:55 PM Jon Turney wrote:

Sorry, based on the previous discussion at [1] this seems to be broken
> at the moment, due to '-x' being broken.
>
> [1] https://cygwin.com/pipermail/cygwin/2023-February/252994.html
>
> If you really need this, please try old setup versions from [2].  If you
> discover which version it got broken in, and/or work out how to fix it,
> please let us know.
>
> [2] https://cygwin.com/setup/
>

Completed testing. The last version where:

--include-source --local-package-dir "path" -x "package[,...]" -P
"package[,...]"

...worked was 2.918. It does not work in 2.919 and later.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Setup: How to automate source download for packages already installed?

2023-03-27 Thread Bill Stewart via Cygwin
On Mon, Mar 27, 2023 at 2:18 PM Bill Stewart wrote:

On Wed, Mar 4, 2020 at 6:32 AM Jon Turney wrote:
>
>
>> If a package is listed for both -x and -P, it is reinstalled, so while
>> not ideal, you might be able to achieve something like what you want
>> with 'setup -I -x "package1,package2,package3" -P
>> "package1,package2,package3"'
>>
>> An option which explicitly just installs the source for a specified
>> package might be useful.
>>
>
> It seems that
>
> --local-install -x "package[,...]" -P "package[,...]"
>
> ...no longer works to automate source download for packages already
> installed...
>
> Is there another workaround? (Or did I miss something obvious?)
>

(Correction: I meant to write '--local-package-dir', not '--local-install')

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Setup: How to automate source download for packages already installed?

2023-03-27 Thread Bill Stewart via Cygwin
On Wed, Mar 4, 2020 at 6:32 AM Jon Turney wrote:


> If a package is listed for both -x and -P, it is reinstalled, so while
> not ideal, you might be able to achieve something like what you want
> with 'setup -I -x "package1,package2,package3" -P
> "package1,package2,package3"'
>
> An option which explicitly just installs the source for a specified
> package might be useful.
>

It seems that

--local-install -x "package[,...]" -P "package[,...]"

...no longer works to automate source download for packages already
installed...

Is there another workaround? (Or did I miss something obvious?)

Thanks!

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: cygrunsrv -L outputs nothing if service paths are quoted

2023-02-06 Thread Bill Stewart via Cygwin
On Mon, Feb 6, 2023 at 1:06 PM Corinna Vinschen wrote:

Yeah, quoted paths were not handled at all.  I pushed a new version
> 1.64 which contains a patch.
>

Great; thanks!

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


cygrunsrv -L outputs nothing if service paths are quoted

2023-02-06 Thread Bill Stewart via Cygwin
FYI:

In our corporate environment we run vulnerability scans, and one of the
most common complaints of the scanner is "unquoted service paths."

To fix this "vulnerability," I use a quoted service path for cygrunsrv.exe;
e.g.:

"C:\Program Files\Cygwin\cygrunsrv.exe"

This seems to confuse cygrunsrv -L, though, as it produces no output.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Cygwin setup reporter as malware

2022-12-07 Thread Bill Stewart via Cygwin
On Wed, Dec 7, 2022 at 9:21 AM Sylwester Rutkowski wrote:

The setup-x86_64.exe is reported as malicious at
> https://www.virustotal.com/gui/file/edd0a64dc65087ffe453ca94b267169b39458a983b29ac31320fcaa983d0f97e/detection
>
> Can this be resolved somehow?


This is, of course, a false positive.

There are basically two things you can do:

1. Exempt it from your scanner.

2. Report it to the vendor as a false positive.

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Issues to install cygwin 3.3.6

2022-11-21 Thread Bill Stewart
On Mon, Nov 21, 2022 at 7:18 AM Michel Robitaille wrote:

Running setup-x86_64.exe (version 3.3.6) requires an app on Windows 11
> (fully up to date).
> It is looking for an app that does not exist with Microsoft Store.
>

What app is it requiring?

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Permissions issues after installing Windows 10

2022-06-03 Thread Bill Stewart
On Fri, Jun 3, 2022 at 6:23 AM Brent Epp wrote:

I would think so too, but that doesn't appear to be happening. If it
> makes a difference, the SID actually starts with S-1-5-21. I have to
> manually take ownership in order to even access the files at all.
>

Explained another way: According to
https://docs.microsoft.com/en-us/windows/win32/secauthz/well-known-sids -

Constant: SECURITY_NT_NON_UNIQUE
String Value: S-1-5-21
Identifies: SIDS are not unique.

SIDs starting with S-1-5-21 are non-unique, which means basically the SID
is made unique by the addition of a RID (relative identifier).

If the SID starts with S-1-5-21 and ends in 500, it is the local
"Administrator" account of some computer (or domain).

In other words, S-1-5-21 SIDs are computer or domain accounts that the
system couldn't resolve when it enumerated the ACL.

You can see SIDs for local accounts on a machine from PowerShell (all one
line):

Get-WmiObject -Query "SELECT * FROM Win32_UserAccount WHERE
LocalAccount='TRUE'" | Select-Object Name,SID

Note that in the output, these SIDs will start with S-1-5-21 and end with
various RIDs.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Permissions issues after installing Windows 10

2022-06-02 Thread Bill Stewart
On Thu, Jun 2, 2022 at 6:44 AM Brent Epp wrote:

In the [Security] tab for these files or directories, under "Group or
> user names", it lists the owner as "Account Unknown(S-...)".  In some
> cases, these files are completely inaccessible and I can't even take
> ownership or change the permissions.  I have to either restore them from
> a backup or boot to a Linux environment to access them.
>

Windows displays "Account Unknown" (with a SID) in the ACL when it can't
resolve the SID reference.

There can be a number of reasons for this. One common reason is that the
SID belongs to a domain account and the domain is not accessible. Another
is that the SID belongs to a local account on a different computer (e.g., a
removable disk is moved between computers and local accounts are in the
ACL). Well-known SIDs (e.g., S-1-5-32-544 for the local Administrators
group, etc.) should resolve from any computer.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: msi installer file?

2022-03-09 Thread Bill Stewart
On Wed, Mar 9, 2022 at 12:30 PM Monica Parker wrote:

Hi,
> I just want to know if there is an MSI installer file? If not, can one be
> created? Im trying to create a package for SCCM and it wont accept exe
> files.
>

There is no MSI package; sorry.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Bug Report

2022-02-09 Thread Bill Stewart
On Tue, Feb 8, 2022 at 3:02 PM julie77793 wrote:

Cygwin doesn't create an environment variable in bash to indicate that the
> platform is Cygwin under Windows.
>

FYI, as a point of decorum: The subject line of this thread is rather
undiplomatic.

(Bug usually means "software should do X but fails in some way," not
"please add feature X.")

Recommended reading: How to ask questions the smart way[1]

[1] http://www.catb.org/~esr/faqs/smart-questions.html

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: [ANNOUNCEMENT] Updated: setup (2.917)

2022-01-24 Thread Bill Stewart
On Mon, Jan 24, 2022 at 3:49 PM Buchbinder, Barry (NIH/NIAID) [E] via
Cygwin  wrote:

Windows protected your PC
> Microsoft Defender SmartScreen prevented an unrecognized app from starting.
> Running this app might put your PC at risk.
>

[Responding to mailing list]

Not to state the obvious, but this means that the Microsoft antivirus
program prevented it from running.

Exclude it.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Inquiry on Apache Log4j's Effect on Cygwin Software

2021-12-23 Thread Bill Stewart
On Thu, Dec 23, 2021 at 8:19 AM Iyana Garry wrote:

Is there any confirmation that Cygwin software is not impacted by the
> Apache Log4J vulnerabilities (CVE-2021-44228, CVE-2021-45046 and
> CVE-2021-45105)?
>

I'm not sure why there would need to be any such confirmation. Log4J is a
Java application logging framework.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Problem with ssh(d)

2021-11-10 Thread Bill Stewart
On Wed, Nov 10, 2021 at 8:28 AM Strasser, Dominik (DI SW ICS ICV) wrote:

I know that this is the standard installation. But we absolutely need
> passwordless login. So this was the workaround we found.
> The number of groups differs when sshd is run as local system, and when
> authorized_keys exist or not. Groups are OK, when it is run under the one
> user we absolutely need the passwordless login.
>

Password-less logon is supported when running as local system. I do this
all the time, so there must be something that is not correct about your
configuration.

Sorry, don't know what that might be.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Previously-functional gawk script now failing to execute - PLEASE HELP!!!

2021-09-15 Thread Bill Stewart
On Wed, Sep 15, 2021 at 3:11 PM Bryan VanSchouwen wrote:

WHAT THE HECK IS GOING ON WITH THIS SOFTWARE?!
>

 I don't know what the technical problem is, but I would politely point out:

1. Typing things in all caps is considered shouting

2. Shouting at the people who might be able to help you is probably not the
best way to get help (to put it mildly)

3. Remember that the people who might be able to help you do so on a
volunteer basis (also, see #2 above)

You may be frustrated, but you're not doing yourself any favors by being
rude.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46

2021-04-21 Thread Bill Stewart
On Wed, Apr 21, 2021 at 1:28 PM Corinna Vinschen wrote:

This is not the right place to discuss this in detail, but to me, a
> straightforward and sensible approach would have been to give the 64
> bit system dir another name right from the start:
>
>   C:\Windows\System64
>

That would not have worked for backward compatibility reasons.

https://docs.microsoft.com/en-us/previous-versions/technet-magazine/ff955767(v=msdn.10)

The "32" suffix in System32 can be seen as just a label and doesn't
represent the "bitness" of the files within. (As Raymond says, "you should
think of System32 as the somewhat strange name for the 'system DLLs in the
same bitness as the application [in this case, OS] that’s running'
directory").

(You're right - not really the right place to discuss - was just responding
to the evaluative labeling.)

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46

2021-04-21 Thread Bill Stewart
On Wed, Apr 21, 2021 at 10:47 AM Corinna Vinschenwrote:


> A sane assumption is for instance, if you cd to foo, that your in foo.
> That's what the FSR breaks in a thorough way.  I. e. on WOW64:
>
>   $ cd /cygdrive/c/Windows
>   $ ls -1d Sys*
>   SysWOW64
>   System
>   System32
>   SystemApps
>   SystemResources
>
> So there are two dirs, one called System32, one called SysWOW64.
>

This is, of course, completely expected (notwithstanding the confusion
caused by the "bitness" names being opposite of what some expect).


> Note how there's *no* such directory called "Sysnative".  Still...
>
>   $ cd System32
>
> works fine.  You're just not in System32, but in SysWOW64.  Sane?
>

This is completely sensible and expected, as the entire point of the WoW
emulator is to emulate 32-bit Windows.

Alternatively:
>
>   $ cd Sysnative
>
> works fine and now you're, oh wonder, in System32.  If that's sane,
> running head first into a wall is, too :)
>

"Sysnative" isn't an actual file system directory, as noted, but an "alias"
(for lack of a better word) that allows, from a Wow64 process, to refer to
the real 64-bit system directory. You can use the name "Sysnative" if you
are certain you really want to refer to the 64-bit system directory.

This all seems like a pretty straightforward and sensible approach, IMO.

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46

2021-04-21 Thread Bill Stewart
On Wed, Apr 21, 2021 at 3:20 AM Corinna Vinschen wrote:

The problem here is the File System Redirector,
>
> https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector
>
> This thing is really a problem because it break every, otherwise
> sane assumption.  Hmm, bummer.  I need some time to think about
> a solution here.
>

Can you elaborate on what "sane assumptions" get broken? (The redirector is
working as designed, as I understand it?)

Bill

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: sshd.exe waits repeatedly with SYN_SENT for inaccessible ldap

2021-01-28 Thread Bill Stewart
On Thu, Jan 28, 2021 at 12:06 PM Bill Stewart wrote:
>
> On Tue, Jan 26, 2021 at 6:31 AM Ilya Basin via Cygwin wrote:
>
> > The problem is solved.
> > Our DHCP server was sending me a bad WINS server ip. After fixing the issue 
> > I had to reboot the PC (just refreshing the ip and restarting cygsshd was 
> > not enough).
>
> It's doubtful a reboot is required. Probably 'nbtstat -RR' would have
> been sufficient (although this command does require elevation).

Sorry, that should have read 'nbtstat -R' (not 'nbtstat -RR').

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: sshd.exe waits repeatedly with SYN_SENT for inaccessible ldap

2021-01-28 Thread Bill Stewart
On Tue, Jan 26, 2021 at 6:31 AM Ilya Basin via Cygwin wrote:

> The problem is solved.
> Our DHCP server was sending me a bad WINS server ip. After fixing the issue I 
> had to reboot the PC (just refreshing the ip and restarting cygsshd was not 
> enough).

It's doubtful a reboot is required. Probably 'nbtstat -RR' would have
been sufficient (although this command does require elevation).

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: How to reinstall everything?

2021-01-21 Thread Bill Stewart
On Sun, Jan 17, 2021 at 11:23 AM matthew patton wrote:

> can we fix setup.exe to read STDIN with '-P', like so?
> echo 'pkg1,pkg2,pkg3' | setup.exe -P -

What problem does this solve for you?

PowerShell example, if you're not familiar:

$packages = 'pkg1','pkg2','pkg3'
setup -P ($packages -join ',')

Or even this:

setup -P ((Get-Content packages.txt) -join ',')

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: ssh-host-config doesn't "inherit" user admin privilege

2021-01-15 Thread Bill Stewart
On Thu, Jan 14, 2021 at 6:21 PM art wrote:
>
> I get a security code 5 when ssh-host-config tries to install cygsshd. I was 
> logged into Win 10 pro/x64 as an admin user. The "fix" was to start a 
> Cygwin64 Terminal with Admin and then run ssh-host-config within this script. 
> Other installers have produced the same nuisance. These needed an admin 
> command prompt to get around the same "inheritance" limitation.

Are you asking a question or reporting a problem?

It sounds like you are confusing logging on using an admin user (i.e.,
a user that's a member of the local Administrators group) with
elevation (a process that runs using full administrative privileges).

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Is it possible to define the root directory in a cross compiled program

2021-01-05 Thread Bill Stewart
On Tue, Jan 5, 2021 at 6:34 AM Eliot Moss wrote:

> Is there a Windows equivalent to chroot (either the program or the 
> library/system call)?

See: https://cygwin.com/cygwin-ug-net/highlights.html

Quoting:

"Chroot is supported. Kind of. Chroot is not a concept known by
Windows. This implies some serious restrictions. First of all, the
chroot call isn't a privileged call. Any user may call it. Second, the
chroot environment isn't safe against native windows processes. Given
that, chroot in Cygwin is only a hack which pretends security where
there is none. For that reason the usage of chroot is discouraged.
Don't use it unless you really, really know what you're doing."

What I have found is that the cygwin chroot is not a security boundary
(it seems it is possible for an account to "escape" from the "chroot
jail"). However, whatever account is being used by the cygwin process
is still subject to its rights/permissions in Windows (i.e.,
"escaping" from a "chroot jail" does not give additional rights and/or
permissions to an account that it didn't have before).

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Setting env var CYGWIN for Cygwin service?

2021-01-04 Thread Bill Stewart
On Mon, Jan 4, 2021 at 3:08 PM Oleksandr Gavenko wrote:

> /usr/bin/exim-config has line with:
>
>   cygrunsrv -I exim -p /usr/bin/exim -e CYGWIN="${cygenv}" ...
>
> So it is the answer (as pointed by others).
>
> Still "procexp" doesn't show anything else besides PATH/WINDIR for "exim"
> process. It can be that cygrunsrv passed env vars in some Cygwin *magical 
> way*.
>
> Cannot confirm this, attempt to read /proc/X/environ gives "". There
> is no problem to read "environ" for other Cygwin processes.

I have observed the same thing. The environment variable setting
exists in the 
HKLM\System\CurrentControlSet\Services\\Parameters\Environment
registry subkey, but Process Explorer does not show the environment
variable in the list of environment variables for the process.

I have not looked at the code, but it seems that environment variables
specified in this way are not propagated to the environment block for
the process but instead are read some other way.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Setting env var CYGWIN for Cygwin service?

2020-12-31 Thread Bill Stewart
On Wed, Dec 30, 2020 at 1:09 PM Oleksandr Gavenko wrote:

> What way can I pass env var "CYGWIN" to the Cygwin service?

cygrunsrv --help shows this:

-e, --env Optional environment strings which are added
to the environment when service is started. You can add up to 255
environment strings using the `--env' option.

These are added as REG_SZ values in
HKLM\SYSTEM\CurrentControlSet\Services\\Parameters\Environment
registry subkey.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: sshd broken by seemingly trivial network change

2020-12-17 Thread Bill Stewart
On Thu, Dec 17, 2020 at 2:25 PM Erik Soderquist wrote:

> I've had weird instances where the Windows Firewall tools lied; I
> confirmed this by temporarily shutting down the Windows Firewall
> entirely, then restarting the service having problems and retesting.
> On retest, it worked fine, confirming it was the firewall causing the
> problem.

I have never experienced anything like this, on any Windows version
for any application, after working with just about every version of
Windows firewall since its inception, in a number of different
organizations.

In every case I thought the Windows firewall was the culprit, it turns
out it was my own misunderstanding.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: sshd broken by seemingly trivial network change

2020-12-17 Thread Bill Stewart
On Thu, Dec 17, 2020 at 1:51 PM Charles Russell wrote:

> Selecting "Advanced Settings" and then "incoming rules", I see one rule
> for sshd private: enabled, allowed and one rule for sshd public:
> enabled, allowed. There is a third rule for sshd domain: (disabled,
> allowed). I believe that one is irrelevant but I enabled it anyway,
> which did not help.
>
> Is there someplace else I should look? This is Windows 7 Home Premium.

If it works when you disable the firewall, then (to state the obvious,
sorry) there is a rule in the firewall that is blocking the traffic.

I would suggest to examine all of the rules carefully. I say this
because it is happened to me before, and I could have sworn that I
looked at all of the rules.

BIll
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Cygwin sshd broken by seemingly trivial network change

2020-12-17 Thread Bill Stewart
On Thu, Dec 17, 2020 at 10:44 AM Charles Russell wrote:

> The last line was a giveaway.  The problem is with the Windows firewall.
> However, I have found no remedy apart from totally disabling the
> firewall. The old settings no longer work: sshd is enabled for both
> private and public networks, but the firewall is still blocking access.

If you ever got a GUI pop-up in Windows requesting access and you
canceled the dialog, I have noticed that Windows will add a "deny"
rule to the firewall.

Make sure to look carefully through all of the firewall rules and
check whether there is a rule blocking that executable or port.

Just something to check.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Please add /cygdrive/c/Windows/Sysnative to the default PATH

2020-11-24 Thread Bill Stewart
On Tue, Nov 24, 2020 at 12:25 AM Thomas Wolff wrote:

> > and please note that SysNative appears nowhere!
>
> That's because Sysnative is not a known folder. It is rather unknown
> just because it is virtual :)
> And that is the problem I tried to address. In cygwin32, you can `cd
> $WINDIR/Sysnative` but you wouldn't see the folder. For tools like ls or
> find it simply does not exist, while obviously it exists somehow and can
> be used in PATH.

For the benefit of other readers regarding the Sysnative virtual directory:

https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector

The other links on the Microsoft documentation page regarding WoW64
are also quite helpful.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Please add /cygdrive/c/Windows/Sysnative to the default PATH

2020-11-18 Thread Bill Stewart
On Tue, Nov 17, 2020 at 4:42 PM tealhill via Cygwin wrote:

> Therefore, I am suggesting that Cygwin work around Microsoft's omission.
> My suggested workaround is for Cygwin to add Sysnative to its own
> $PATH, automatically.

I don't think that should be a default behavior in cygwin and is
likely to cause confusion. If you want to add it yourself, you can do
so.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Windows 2019 support?

2020-09-21 Thread Bill Stewart
On Sat, Sep 19, 2020 at 1:37 AM Thomas Wolff wrote:

> > Cygwin can be expected to run on all modern, released versions of Windows, 
> > from
> > Windows Vista, 7, 8, 8.1, 10, Windows Server 2008 and all later versions of
> > Windows, except Windows S mode due to its limitations. The 32 bit version of
> > Cygwin also runs in the WOW64 32 bit environment on released 64 bit 
> > versions of
> > Windows including ARM PCs, the 64 bit version of course only on 64 bit 
> > AMD/Intel
> > compatible PCs."
>
> You'd mention WOW64 but not Windows 32 bit. Is that on purpose? It might
> suggest to someone that cygwin does not run on a 32 bit processor but it
> does.

If WOW64 is supported, then IMO it's implied that the 32-bit version
works on 32-bit Windows. I suppose it wouldn't hurt to state it
explicitly, though.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Windows 2019 support?

2020-09-17 Thread Bill Stewart
On Thu, Sep 17, 2020 at 7:58 AM Chris Bovitz wrote:

Cygwin can be expected to run on all modern, released versions of Windows.
> State [sic] January 2016 this includes Windows Vista, Windows Server 2008
> and all later versions of Windows up to Windows 10 and Windows Server 2016.
>
> To me, this implies that Windows Server 2019 is supported, but is that
> true?  If so, could the FAQ be updated to show that?  Thanks.
>

Windows Server 2019 is just the server version of Windows 10 1809. In my
testing it works without any issues.

My recommendation is for the FAQ to state:

"Cygwin can be expected to run on all modern, released versions of Windows.
Since January 2016 this includes Windows Vista, Windows Server 2008, and
all later versions."

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Using cygwin tar from a DOS window

2020-09-02 Thread Bill Stewart
On Wed, Sep 2, 2020 at 3:30 PM Wayne Davison wrote:

Something like this seems to work fine (with very minimal testing):
>
> @echo off
> PATH=C:\cygwin64\bin
> C:\cygwin64\bin\tar %*
>

Keeping in mind that cmd.exe provides no environment variable scoping using
scripts, I would recommend setlocal/endlocal; example:

@echo off
setlocal enableextensions
rem set CYGPATH to cygwin "/bin" directory
set CYGPATH=C:\cygwin64\bin
set Path=%CYGPATH%;%Path%
"%CYGPATH%\tar" %*
endlocal

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Using cygwin tar from a DOS window

2020-09-02 Thread Bill Stewart
On Wed, Sep 2, 2020 at 11:40 AM Douglas Coup wrote:

I did try copying all of the .dll files in the Cygwin bin folder to the
> same folder where the copy of Cygwin's tar.exe sits.
>

Why is this step necessary? Is the cygwin install process not working?

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Using cygwin tar from a DOS window

2020-09-02 Thread Bill Stewart
On Wed, Sep 2, 2020 at 8:58 AM Douglas Coup wrote:

But if I use tar from a DOS window ...
>

Surely you don't mean DOS? DOS doesn't exist in Windows any more (unless
you are using an emulator like DosBox or a VM).

Do you mean a cmd.exe console window? (cmd.exe is a Windows console-mode
program that, despite appearances, is not "DOS." DOS was a real-mode
single-tasking operating system.)

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Issue in starting the CYGSSHD service

2020-08-17 Thread Bill Stewart
On Mon, Aug 17, 2020 at 10:37 AM Subramanya Narayanaswamy via Cygwin wrote:

Has anyone faced the same issue I'm facing now ? After installation of
> CYGWIN I tried to run command to start cygsshd in CYGWIN terminal with
> Admin privalages and facing the below error. Any help would be great thanks!
>

Judging from the lack of responses, I would guess that not many are running
into the problem you're having, which is apparently caused by a
configuration problem in your specific cygwin installation.

I would suggest installing a cygwin instance on a different machine and
setting it up per the docs.

Once that's working, compare the configuration files between the one that's
not working and the one that is working.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Need information on creating service user to connect from the Agent server to Windows hosts for installing agents on remote

2020-08-10 Thread Bill Stewart
On Mon, Aug 10, 2020 at 12:21 PM Subramanya Narayanaswamy via Cygwin wrote:

When I run Cygwin.bat file and try to configure SSH host service to connect
> from Agent server on this windows host, I don't get a prompt to create
> CYGWIN user at all. By default it is taking the SYSTEM default user for
> authentication.
>

The service now runs as SYSTEM by default and this is a good thing because
you don't have to manage its password or configure special user rights for
it.

Why doesn't this work for your scenario?

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: need to fix permissions

2020-07-16 Thread Bill Stewart
On Wed, Jul 15, 2020 at 7:46 PM  wrote:

> Thank you very much !
>
> I didn't see anybody mention that attrib step, in all the _many_ docs
that i read.

You're welcome. This is probably because file attributes are not actually
security attributes.

(As an aside: Please remove the responder's email address when replying, as
I have done above, to prevent potential spammer harvesting.)

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: need to fix permissions

2020-07-15 Thread Bill Stewart
On Tue, Jul 14, 2020 at 6:34 PM  wrote:

the cygwin home folder is giving me a LOT of trouble with access denied.
>
> i've tried takeown and icacls to fix permissions, and strangely it worked
> for _Some_ files, but i still have files which i need to back up which are
> causing "access denied" errors.
>
> i'm hoping someone who understands how cygwin has set permissions can give
> me a way to fix-up the permissions in ntfs land.
>

The following is what I have used successfully in the past and should reset
everything:

1. Open an elevated PowerShell or cmd.exe shell

2. Take ownership to Administrators group:

takeown /F "C:\cygwin" /A /R /D Y

3. Reset all file permissions:

icacls "C:\cygwin" /reset /T /C

4. Reset the file attributes:

attrib -h -r -s "C:cygwin\*" /s

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: [EXTERNAL] Re: Country Of Origin Verification - 8944

2020-06-17 Thread Bill Stewart
On Wed, Jun 17, 2020 at 9:37 AM Watson, Christian M. (GRC-V000)[Peerless
Technologies Corp.] wrote:

We appreciate the reply. We are looking to use this software on a NASA
> facility and that is why we sent you the questions we did to comply with
> our security restrictions. If you could tell us where this software
> originated from that would be all we need to move forward. We have followed
> the link you suggested and could still not find this information.
>

I doubt there is a simple direct answer to your question.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Which rsync version is current?

2020-05-28 Thread Bill Stewart
On Wed, May 27, 2020 at 8:58 PM Marco Atzeri wrote:

> specially as 3.1.3 was NOT building under cygwin
> https://bugzilla.samba.org/show_bug.cgi?id=14365

...and that would be why 3.1.3 hasn't been available for Cygwin. Thanks.

For the benefit of others: In that bug report, Wayne Davison (rsync
maintainer) says that this problem is resolved in the upcoming rsync
3.2.0 release.

Thanks

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Which rsync version is current?

2020-05-27 Thread Bill Stewart
On Wed, May 27, 2020 at 2:19 PM Ken Brown  wrote:

> The latest stable release, 3.1.3, is two years old.  I'm sure Jari had good
> reasons for wanting to make a more recent version available.

Right; except that 3.1.3 is not available for Cygwin (despite its age)
- at least, it doesn't appear as an option in the Cygwin Setup tool.

Presumably a new version of rsync will be available for Cygwin "real soon now".

I'm going to stick with 3.1.2 for now.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Which rsync version is current?

2020-05-27 Thread Bill Stewart
On Wed, May 27, 2020 at 1:20 PM Andrey Repin wrote:

> > When I run rsync --version, I see this:
> >
> > rsync  version 3.2.0dev  protocol version 31
> >
> > However the Cygwin Setup program says that my rsync is current and is
> > listed as this version:
> >
> > 3.1.3+20200429+gitf7746d0-1
> >
> > rsync.samba.org says the current version is 3.1.3.
> >
> > So...what's actually the latest? What's the difference between these?
>
> Run `which rsync` to see which one is responding to you.
>
> 3.2-dev is likely a snapshot from ongoing development branch.

`which rsync` outputs

/usr/bin/rsync

as expected.

What I am saying is that the Setup program says the installed version
is 3.1.3+20200429+gitf7746d0-1.

For that installed version, `rsync --version` says the version is 3.2.0dev

Thus it seems that "3.1.3+20200429+gitf7746d0-1" is really identical
to "3.2.0dev".

Is this statement correct?

If this statement is indeed correct, I would say that this is
confusing (at the least) and that Setup or the rsync source code (or
both) should be updated to reflect the correct version number.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Which rsync version is current?

2020-05-27 Thread Bill Stewart
When I run rsync --version, I see this:

rsync  version 3.2.0dev  protocol version 31

However the Cygwin Setup program says that my rsync is current and is
listed as this version:

3.1.3+20200429+gitf7746d0-1

rsync.samba.org says the current version is 3.1.3.

So...what's actually the latest? What's the difference between these?

Thanks

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: ssh-pageant

2020-04-23 Thread Bill Stewart
On Thu, Apr 23, 2020 at 1:00 PM Thomas Wolff wrote:

> The Cygwin package manager (setup) in the description of the ssh-pageant
> package:
> "SSH agent for Cygwin/MSYS that links to PuTTY's Pageant"

The language is a bit imprecise, I suppose. Pageant is related to but
!= PuTTY - you don't have to use PuTTY to use Pageant (you may just
prefer to use Pageant instead of ssh-agent or whatever and not use
PuTTY).

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: setup-x86_64.exe --quiet-mode issues using Management Tools

2020-04-21 Thread Bill Stewart
On Tue, Apr 21, 2020 at 7:56 AM KAVALAGIOS Panagiotis (EEAS-EXT) wrote:

> Are you sure that a setup that is automated with a silent
> installation, but it still displays a progress popup, it cannot fail
> if it is not able to display that window when there is no user
> logged in? I am not, hence I would prefer that setup could ensure a
> real background operation.
>
> An exception displaying the progress window could lead to the
> interruption of the installation process. That is a blocking
> condition as well, even though no input is required by the user.

An exception during the installation would only block if it prevents
the process from closing (i.e., if it displays a message box). That
could happen in an installation even if the installer isn't displaying
a GUI.

What I am saying is what's important about automated installation is
that it not block (even in the case of an exception). Whether the
installer displays a GUI or not is really irrelevant, particularly if
the installation isn't running as the current user (in which case the
current user doesn't see the GUI anyway).

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: setup-x86_64.exe --quiet-mode issues using Management Tools

2020-04-21 Thread Bill Stewart
On Tue, Apr 21, 2020 at 2:08 AM KAVALAGIOS Panagiotis (EEAS-EXT) wrote:

> s/silent/verysilent/g>
> ---
> /SILENT, /VERYSILENT Instructs Setup to be silent or very silent.
> When Setup is silent the wizard and the background window are not
> displayed but the installation progress window is. When a setup is
> very silent this installation progress window is not displayed.
> Everything else is normal so for example error messages during
> installation are displayed and the startup prompt is (if you haven't
> disabled it with DisableStartupPrompt or the '/SP-' command line
> option explained above).
> ---
>
> Cygwin setup supports does not support very silent installation.
> That is our major issue describing in this thread.

My point is that "very silent" is not necessary for automation. All
you need is for the installer not to stop for input.

Whether a GUI appears or not is irrelevant, as long as it doesn't
block (stop for input).

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Two naive questions

2020-04-20 Thread Bill Stewart
On Mon, Apr 20, 2020 at 2:09 PM Christopher Faylor wrote:

> With mailman, if you click on a message in the archives and then click
> on the email address at the top, your mail client of choice will be
> opened with correct "In-Reply-To" set.  If you want to reply to the list
> then replace the "To" with the email address of the mailing list.  You
> can also download the mailbox-formatted archive, read it with a client
> like "mutt" and reply that way.

So it is _possible_, but not exactly user-friendly (you're presuming
that end-users even understand these instructions). What if a user is
limited to a web-based mail client, for example, and has no way to
access said options? (I think it goes without saying that a "use a
better mail client" response is not feasible, at least for some users,
in addition to possibly sounding a bit elitist.)

Aside from this, in my opinion, the above instructions are an awkward
(IMO) workaround due to limitations inherent in trying to use email
for something it wasn't really designed for (again: just my opinion).

> OTOH, most message boards have a way to freeze old discussions and
> discourage resurrecting dead threads.

That depends on who administers the forum. That's not necessarily an
inviolable rule.

Again - not trying to start a controversy here - just pointing out
that a mailing list has some limitations. (After all, web-based
discussion forums were invented for a reason.)

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Two naive questions

2020-04-20 Thread Bill Stewart
On Mon, Apr 20, 2020 at 12:11 PM Eliot Moss wrote:

> On 4/20/2020 1:41 PM, Bill Stewart wrote:
>
> > This exact problem is one of the main reasons why many organizations
> > prefer a web-based forum rather than a mailing list. (NNTP is a
> > possibility, but many [most?] organizations block NNTP access for
> > content management and security reasons.) One of the other main
> > reasons a web-based forum is preferable is that participants don't
> > have to store/delete irrelevant messages.
>
> Definitely not intending to start a controversy, but maybe cygwin
> could switch to a bug tracker sort of system for dealing with issues
> and questions ...

My intent wasn't to start a controversy either...just pointing out
some limitations of mailing lists.

The aforementioned points are the main reasons why I agree with you
that a web-based solution would be better for questions and support.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Two naive questions

2020-04-20 Thread Bill Stewart
On Mon, Apr 20, 2020 at 11:20 AM Stephen Carrier wrote:

> I think the OP's first question was asking how to effectively join
> an existing thread when one is browsing the recent archives and not
> subscribed to the list.
>
> Joining the list after seeing a question one would like to answer
> doesn't help, because the message you would like to respond to has
> already gone by.
>
> I think a good solution would be to get the message number from the web
> archive and request that a particular message be sent to you.  Then you
> could respond to that message and join the thread properly.
>
> However, there doesn't seem to be a way to do that.  I used to be notified
> how to retrieve messages I had missed (due to bouncing) but the method
> did not work.  Furthermore, the mailman faq doesn't mention any way to
> do this.

I would say that this is a side-effect of using a mailing list when
what's really being asked for is a discussion forum.

A mailing list is convenient for self-subscription and replies, but
replying to a past message (one that's "already gone by" as stated
above) is not really possible (that I know of?). Starting a new
message to the list with an identical subject to an existing thread
doesn't reply to the existing thread but rather starts a new thread
with an identical subject (since the thread ID is different).

What I could suggest for this case is to start a new message and
provide a link to a web-based copy of the message that you're replying
to - this at least provides context, even though it starts a new
thread. (This, of course, depends on a web-based archive of past
messages.)

This exact problem is one of the main reasons why many organizations
prefer a web-based forum rather than a mailing list. (NNTP is a
possibility, but many [most?] organizations block NNTP access for
content management and security reasons.) One of the other main
reasons a web-based forum is preferable is that participants don't
have to store/delete irrelevant messages.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: setup-x86_64.exe --quiet-mode issues using Management Tools

2020-04-17 Thread Bill Stewart
On Fri, Apr 17, 2020 at 1:01 AM KAVALAGIOS Panagiotis (EEAS-EXT)  wrote:

> This is the way that we are pushing the packages currently to
> end users is through software managers with silent
> installation.

My point is that "silent" doesn't mean "no visible GUI." It generally
means "the installer doesn't block" (i.e., the installation completes
without user input).

For example, the popular Inno Setup install builder
(https://www.jrsoftware.org/isinfo.php) has a "/SILENT" command line
parameter, which (if the installer is designed correctly) causes the
created installer to install the package without user input. If run in
the user's session, a GUI is still visible; it just doesn't stop to
ask for any input. If you install using a software management tool,
this usually installs in a separate session, so it doesn't matter if
there's a GUI as long as no input is required.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: setup-x86_64.exe --quiet-mode issues using Management Tools

2020-04-16 Thread Bill Stewart
On Thu, Apr 16, 2020 at 2:25 AM KAVALAGIOS Panagiotis (EEAS-EXT) wrote:

> > From: Cygwin On Behalf Of Bill Stewart
> > On Wed, Apr 15, 2020 at 9:03 AM KAVALAGIOS Panagiotis (EEAS-EXT) wrote:
> >
> > > I have already requested a feature to totally remove any GUI from
> > > silent installation:
> > >
> > > https://www.mail-archive.com/cygwin@cygwin.com/msg162887.html
> >
> > Just curious: Why does it matter whether a GUI appears or not, as long as it
> > doesn't block (stop for input)?
>
> Because the package can be sent to your machine when you are working
> and we don't wish to disturb the users. Everything is performed in the
> background. Annoying popups are not welcomed. Silent installation is
> supposed to be silent without any horns shouting in the foreground.

If the install doesn't occur as the current user (and it shouldn't),
the installation won't be visible anyway.

I for one am against installers that run completely invisibly.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: calm bounces (was: Undelivered Mail Returned to Sender)

2020-04-16 Thread Bill Stewart
On Thu, Apr 16, 2020 at 8:35 AM Brian Inglis wrote:

> On 2020-04-15 04:44, Mail Delivery System via Cygwin wrote:
> > This is the mail system at host sourceware.org.
> > I'm sorry to have to inform you that your message could not
> > be delivered to one or more recipients. It's attached below.
> > For further assistance, please send mail to postmaster.
> > If you do so, please include this problem report. You can
> > delete your own text from the attached returned message.
> >The mail system
> > : unknown user: "corinna-cygwin"
> > Reporting-MTA: dns; sourceware.org
> > X-Postfix-Queue-ID: 5A264384A024
> > X-Postfix-Sender: rfc822; cyg...@sourceware.org
> > Arrival-Date: Wed, 15 Apr 2020 10:44:35 + (GMT)
> > Final-Recipient: rfc822; corinna-cyg...@cygwin.com
> > Original-Recipient: rfc822;corinna-cyg...@cygwin.com
> > Action: failed
> > Status: 5.1.1
> > Diagnostic-Code: X-Postfix; unknown user: "corinna-cygwin"
>
> Are others also seeing these bounces from Corinna's releases:
>
> https://sourceware.org/pipermail/cygwin/2020-April/244386.html

Yes

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: setup-x86_64.exe --quiet-mode issues using Management Tools

2020-04-15 Thread Bill Stewart
On Wed, Apr 15, 2020 at 9:03 AM KAVALAGIOS Panagiotis (EEAS-EXT) wrote:

> wrapped in a nice "setup-x86_64.bat" that is executed by the
> installation Powershell script. That command is still popping up a
> progress window, but it was removed by our Landesk configuration.
> You may check if yours having the same option not to allow any GUI
> to be displayed by the installation program.
>
> I have already requested a feature to totally remove any GUI from
> silent installation:
>
> https://www.mail-archive.com/cygwin@cygwin.com/msg162887.html

Just curious: Why does it matter whether a GUI appears or not, as long
as it doesn't block (stop for input)?

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: sshd problem -- seteuid failed -- ancient problem

2020-04-15 Thread Bill Stewart
On Tue, Apr 14, 2020 at 8:01 PM Kevin Schnitzius wrote:

> sshd: PID 1721: fatal: seteuid 1610619958: No such device or address
>
> I just did a clean install:
>  openssh 8.2p1-1
>
> The uid corresponds to me:
> uid=1610619958(+kevins)
>
> Local users work fine; it's only a problem with domain users.
>
> Strictmode=no and the service is running as Local System account.  Is there a 
> domain privilege my box needs for this?
>
> Any ideas?

That looks like the username is not correct. On a domain, it should be
just username, not domain+username

https://cygwin.com/cygwin-ug-net/ntsec.html

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: [cygwin] FAQ entry "#faq.using.sshd-in-domain" obsolete

2020-04-14 Thread Bill Stewart
On Mon, Apr 13, 2020 at 5:52 PM Jason Pyeron wrote:

> I continue to see failures of authentication (both PKI and password
> based) on local vs domain accounts. In fact I have rarely seen two
> sshd installs that are configured the same way.

I would recommend reviewing the Cygwin and sshd versions in use and
check what's different between them. After documenting the specifics,
you can post to this mailing list if you have specific questions.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: [cygwin] FAQ entry "#faq.using.sshd-in-domain" obsolete

2020-04-13 Thread Bill Stewart
On Mon, Apr 13, 2020 at 2:54 PM Jason Pyeron wrote:

> Is there a replacement? It is a very common question.

I would guess that this entry could simply be removed?

I don't think there's any special configuration needed anymore just
because a machine is a domain member.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


FAQ entry "#faq.using.sshd-in-domain" obsolete

2020-04-13 Thread Bill Stewart
It would seem that the following FAQ entry ("How do I setup sshd in a
domain?") is now obsolete:

https://cygwin.com/faq.html#faq.using.sshd-in-domain

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: FYI: avast claims setup threat

2020-03-27 Thread Bill Stewart
On Fri, Mar 27, 2020 at 11:35 AM Ernie Rael  wrote:

> I just downloaded most recent setup-x86_64, v2.903. Avast was not happy.
>
> Threat name: IDP.Generic
>
> I did check with pgp2 --verify before I tried it.

Report it to Avast as a false-positive.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Cygwin-OpenSSH 8.2.2.2

2020-03-24 Thread Bill Stewart
On Tue, Mar 24, 2020 at 4:24 AM Adam Dinwoodie wrote:

> On Tue, 24 Mar 2020 at 01:04, L A Walsh wrote:
> >
> > On 2020/02/27 14:30, Brian Inglis wrote:
> > > No, you must backport all sources to the current and all previous versions
> > 
> > What all previous versions?  Going back to year 2000 or before?
> >
> > That sounds a bit onerous.
>
> I think the point Brian was trying to make was that it is not
> sufficient to provide the source code in future releases of Bill's
> Cygwin-OpenSSH package. To comply with the GPL requirements, Bill
> would need to make available all the relevant source code for every
> binary release he has made of his package.
>
> Alternatively: yes. The GPL _is_ onerous. That's sort of the point: it
> forces people to make source code available even when they don't want
> to, regardless of whether that's because they don't want others
> changing their code or because they just don't want to do the
> additional work.

As already noted last month, the offending Cygwin-OpenSSH package has
been removed from GitHub.

Bill
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Setup mirrors

2020-03-09 Thread Bill Stewart
On Mon, Mar 9, 2020 at 4:09 PM Robert McBroom wrote:

> > Did you search the most obvious place for information?
> > https://cygwin.com/mirrors.html
> >
> That is the list of mirrors not a howto on becoming a mirror

That page formerly had a blurb at the bottom on how to become a
mirror. This should be viewable by looking at a cached version of the
page.

Google search "how to become a cygwin mirror" and you will see that
the /mirrors.html page is the top hit.

Choose to view a cached version of that page.

Bill
"--Problem reports:   http://cygwin.com/problems.htmlFAQ:   
http://cygwin.com/faq/Documentation: 
http://cygwin.com/docs.htmlUnsubscribe info:  
http://cygwin.com/ml/#unsubscribe-simple;


Re: cat /proc/partitions shows only devices, not partitions

2020-03-09 Thread Bill Stewart
On Mon, Mar 9, 2020 at 9:47 AM Hashim Aziz wrote:

> I see. Do you know how I would go about resolving this, as I am using an 
> Administrator account and have never run into any other issues reading, 
> writing or otherwise making changes to those drives.

As a side point: It is important to understand that "logging on using
an account that's a member of the Administrators group" is not the
same as "running elevated" when UAC (User Account Control) is enabled.
(It is not recommended to disable UAC.)

If you don't launch your Cygwin shell using the "Run as administrator"
option, the Administrator group is not enabled in the process token,
and thus actually does not have administrator permissions. (Using the
"Run as administrator" option is often referred to as "running
elevated.")

Bill
"--Problem reports:   http://cygwin.com/problems.htmlFAQ:   
http://cygwin.com/faq/Documentation: 
http://cygwin.com/docs.htmlUnsubscribe info:  
http://cygwin.com/ml/#unsubscribe-simple;


Re: pseudo console and auto-wrap

2020-03-06 Thread Bill Stewart
On Fri, Mar 6, 2020 at 3:04 PM Bill Stewart wrote:

> > As Takashi explained, there is no fix on the cygwin side. It could be
> > fixed on the Windows side, within the ConPTY API.
> > You could report it there...
>
> Thanks - found this:
>
> https://github.com/microsoft/terminal
>
> Seems that this would already be a known issue. Looking through there
> to see if this is already logged...

OK...

When I use mintty or PuTTY, the wrapping works as expected with winpty
(I still use winpty for downlevel OS versions).

When I use cmd.exe or PowerShell and run ssh.exe from there, that's
where I start seeing problems.

It seems there are weird "issues" when running ssh.exe from a Windows console.

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: pseudo console and auto-wrap

2020-03-06 Thread Bill Stewart
On Fri, Mar 6, 2020 at 1:43 PM Thomas Wolff wrote:

> > With disable_pcon set:
> >
> > echo "$PATH" -- wraps correctly
> > cmd /c echo %PATH% -- wraps correctly
> > winpty cmd /c echo %PATH% -- wrapping broken
> >
> > Without disable_pcon set:
> >
> > echo "$PATH" -- wraps correctly
> > cmd /c echo %PATH%  -- wrapping broken
> > winpty cmd /c echo %PATH% -- wrapping broken
> >
> > I would note that in both cases, winpty output is not correct.
> >
> > Does anyone have any ideas on how to fix it?
> Note that winpty is obsolete under current cygwin, and the second cmd
> case is the only issue.
> As Takashi explained, there is no fix on the cygwin side. It could be
> fixed on the Windows side, within the ConPTY API.
> You could report it there...

Thanks - found this:

https://github.com/microsoft/terminal

Seems that this would already be a known issue. Looking through there
to see if this is already logged...

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: pseudo console and auto-wrap

2020-03-06 Thread Bill Stewart
On Thu, Mar 5, 2020 at 8:52 AM Takashi Yano wrote:

> Thomas Wolff wrote:
> > With ConPTY support, the following command results in output that
> > contains an explicit newline at the auto-wrap position:
> > cmd /c echo a line which is wider than your terminal ...
> >
> > For copy/paste, this is surprising and undesired
> > (https://github.com/mintty/mintty/issues/971).
> > Can the line wrapping case be handled specifically, assuming proper
> > auto-wrap mode on the terminal side, to avoid this?
>
> This is internal behaviour of pseudo console.
> So we can not touch it. WSL also behaves the same.

Observations when I ssh to a Windows 10 1909 machine running cygwin
3.1.4/OpenSSH 8.2...

I ran ssh-host-config and tested both with disable_pcon set in CYGWIN
environment variable and without. (This sets REG_SZ value
HKLM\SYSTEM\CurrentControlSet\Services\cygsshd\Parameters\Environment\CYGWIN=disable_pcon)

With disable_pcon set:

echo "$PATH" -- wraps correctly
cmd /c echo %PATH% -- wraps correctly
winpty cmd /c echo %PATH% -- wrapping broken

Without disable_pcon set:

echo "$PATH" -- wraps correctly
cmd /c echo %PATH%  -- wrapping broken
winpty cmd /c echo %PATH% -- wrapping broken

I would note that in both cases, winpty output is not correct.

Does anyone have any ideas on how to fix it?

Thanks,

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Setup: How to automate source download for packages already installed?

2020-03-04 Thread Bill Stewart
On Wed, Mar 4, 2020 at 6:32 AM Jon Turney wrote:

> If a package is listed for both -x and -P, it is reinstalled, so while
> not ideal, you might be able to achieve something like what you want
> with 'setup -I -x "package1,package2,package3" -P
> "package1,package2,package3"'

This does what I need. Thank you!

> An option which explicitly just installs the source for a specified
> package might be useful.

Agreed. Perhaps this could get added to a new iteration of the setup
tool. But combining -I, -x, and -P are a useful workaround.

Thanks!

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: -bash: cd: /cygdrive/j/tri60/220-1116c_1.993: No such file or directory

2020-03-03 Thread Bill Stewart
On Mon, Mar 2, 2020 at 11:08 PM Robert McBroom wrote:

Details in attached file


Hint: When asking for help in a mailing list, the less effort respondents
have to go through, the better.

It is better to put your information directly in the message rather than
attaching a file.

(Why attach a file at all? Just put your text directly in the message.)

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Setup: How to automate source download for packages already installed?

2020-03-02 Thread Bill Stewart
I would like to reinstall a set of packages and automatically install the
source for only those packages.

The packages are currently installed, and I am using a Setup command line
like this:

 -I -P "package1,package2,package3"

The description in --help for -I states "Automatically install source for
every package installed".

It would seem that, in this case, since the named packages are already
installed and up-to-date, the -I option does nothing.

Is my analysis correct?

If so, what is the way to automate source download for a set of packages
that are already installed?

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: OpenSSH: SSHD daemon (as SYSTEM) is partially broken

2020-02-28 Thread Bill Stewart
On Thu, Feb 27, 2020 at 4:10 PM TestUser1 wrote:

So is this expected to work fine in my environment, Windows Server 2016 (OS
> Version 10.0.14393), without the workaround?
>

 I can't reproduce on Windows Server 8.1/Server 2012 R2 or later.

But you can certainly try the workaround.

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: [ANN] Cygwin-OpenSSH 8.2.2.2

2020-02-28 Thread Bill Stewart
On Thu, Feb 27, 2020 at 3:31 PM Brian Inglis wrote:

No, you must backport all sources to the current and all previous versions
> and
> redistribute, or at least make them visible and available on your site,
> otherwise you are in breach of the licence and must withdraw all
> distributions
>

I have removed the package. (The phrase "no good deed goes unpunished"
comes to mind.)

I will put up a separate package later that does not contain any cygwin
binaries and write a script instead that can download the needed binaries
and sources using the cygwin setup tool (that the user will have to
download themselves). In this way I will be hosting no binaries and will
not be in violation of any license.

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: [ANN] Cygwin-OpenSSH 8.2.2.2

2020-02-27 Thread Bill Stewart
On Thu, Feb 27, 2020 at 11:52 AM Achim Gratz wrote:

But more to the point: since you include GPL components, a binary-only
> distribution is not OK.  The sources for at least the GPL licensed
> utilities and libraries is missing.  It's not enough to say what these
> are and roughly where to get them and leave the users with figuring it
> out for themselves, you are supposed to provide sources in the same way
> as your binaries, for the exact version you used to create the binaries,
> including any modifications to the build system or the sources
> themselves.
>

I misunderstood, since the source is already freely available from cygwin
and I am not changing any of the binaries.

I can certainly include the source as a component in the installer for the
next version.

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: OpenSSH: SSHD daemon (as SYSTEM) is partially broken

2020-02-27 Thread Bill Stewart
On Thu, Feb 27, 2020 at 11:09 AM n0nc3  wrote:

It appears Cygwin SSHD's functionality is partially broke in the later
> versions, where SSHD runs as SYSTEM (no longer cyg_server).
>
> On reboot, any attempt to SSH into the server *before* any previous logon
> attempt (RDP/locally/etc) is quickly denied:
>
>debug1: Offering public key: /home//.ssh/id_rsa
>debug3: send_pubkey_test
>debug2: we sent a publickey packet, wait for reply
>Connection closed by 
>
> Once an RDP/local login is attempted, regardless of success/failure,
> subsequent ssh attempts will progress to the password prompt which
> eventually gets us in.
>

This is a known issue on OS versions older than 8.1.

See thread starting with this message:

https://cygwin.com/ml/cygwin/2019-03/msg00087.html

My proposed workaround is this:

https://cygwin.com/ml/cygwin/2019-03/msg00113.html

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: [ANN] Cygwin-OpenSSH 8.2.2.2

2020-02-27 Thread Bill Stewart
On Wed, Feb 26, 2020 at 11:47 PM ASSI wrote:

You will perhaps want to read the Cygwin licensing terms
> plus the licensing terms of each of the packages you distribute.
>

The relevant licenses are provided as links in the installer and referenced
in the User's Guide.

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



[ANN] Cygwin-OpenSSH 8.2.2.2

2020-02-26 Thread Bill Stewart
I have updated the package:

https://github.com/Bill-Stewart/Cygwin-OpenSSH

Installer is available on the 'Releases' tab.

Description:

Cygwin-OpenSSH is a convenient packaging of the Cygwin version of OpenSSH
for Windows systems.

Notable changes:

- Updated OpenSSH to version 8.2

- Updated cygwin1.dll to 3.1.4

- posh.exe (default shell, launches PowerShell) can now launch PowerShell
Core (if installed)*

- ps1exec.exe replaced with runposh.exe (supports PowerShell Core)

- Minor script updates

*To use PowerShell Core instead of Windows PowerShell, modify /etc/profile
to run '/bin/posh -c' instead of just '/bin/posh'.

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin SSH - seteuid no such device or addresss

2020-02-23 Thread Bill Stewart
On Sun, Feb 23, 2020 at 3:33 AM jinsu mathew wrote:

I've setup Cygwin and want to ssh with domain user account on windows
> server 2012 R2. It works fine if I start the sshd service with "Local
> system account" but if I start the service with a "cygserver" local account
> or "domain\cygserver" then the service starts fine but when I try to ssh I
> see the message sshd: PID 1944: fatal: seteuid 1801: No such device or
> address.
>

 Why do you need to start sshd with an account other than localsystem?

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: sshd sessions hang after cygwin1.dll 3.0.7

2020-01-30 Thread Bill Stewart
Thank you for the assistance!

I released the latest version of my installer, now available (under
"Releases" tab) here:

https://github.com/Bill-Stewart/Cygwin-OpenSSH

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: sshd sessions hang after cygwin1.dll 3.0.7

2020-01-30 Thread Bill Stewart
On Thu, Jan 30, 2020 at 12:33 PM Bill Stewart wrote:

> I added cygwin-console-helper.exe and this resolved it, at least on
> Windows 10. My next step is to test on Server 2012 R2.

Tested, and works fine also on Server 2012 R2. Thanks for the help!

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: sshd sessions hang after cygwin1.dll 3.0.7

2020-01-30 Thread Bill Stewart
On Thu, Jan 30, 2020 at 9:46 AM Takashi Yano wrote:

> Bill Stewart wrote:
> >
> > When I use cygwin1.dll versions newer than 3.0.7, sshd.exe hangs
> > whenever establishing a connection.
> > ...
> > Any ideas?
>
> You need cygwin-console-helper.exe for newer cygwin pty which
> supports pseudo console.
>
> I believe you do not need winpty anymore because newer cygwin
> utilizes pseudo console in pty.

Excellent, thank you!

I added cygwin-console-helper.exe and this resolved it, at least on
Windows 10. My next step is to test on Server 2012 R2.

Since this package is still used for older OS versions, I will still
need winpty for now.

Thanks!

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



sshd sessions hang after cygwin1.dll 3.0.7

2020-01-30 Thread Bill Stewart
I have created an OpenSSH installer for Windows users:

https://github.com/Bill-Stewart/Cygwin-OpenSSH

Basically it includes only the minimum files from Cygwin needed to run
OpenSSH and has some additional conveniences (the foremost of which is
to automatically install the service).

The problem:

When I use cygwin1.dll versions newer than 3.0.7, sshd.exe hangs
whenever establishing a connection. Following is the output from 'sshd
-d':

debug1: sshd version OpenSSH_8.1, OpenSSL 1.1.1d  10 Sep 2019
debug1: private host key #0: ssh-rsa SHA256:...
debug1: private host key #1: ecdsa-sha2-nistp256 SHA256:...
debug1: private host key #2: ssh-ed25519 SHA256:...
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: fd 5 clearing O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 4, 4
Connection from  port 52466 on  port 22
debug1: Local version string SSH-2.0-OpenSSH_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.0
debug1: match: OpenSSH_8.0 pat OpenSSH* compat 0x0400
debug1: permanently_set_uid: 197767/197121 [preauth]
debug1: list_hostkey_types:
rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
[preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: curve25519-sha256 [preauth]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256 [preauth]
debug1: kex: client->server cipher: chacha20-poly1...@openssh.com MAC:
 compression: none [preauth]
debug1: kex: server->client cipher: chacha20-poly1...@openssh.com MAC:
 compression: none [preauth]
debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
debug1: rekey out after 134217728 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: Sending SSH2_MSG_EXT_INFO [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: rekey in after 134217728 blocks [preauth]
debug1: KEX done [preauth]
debug1: userauth-request for user  service ssh-connection
method none [preauth]
debug1: attempt 0 failures 0 [preauth]
debug1: user  matched 'User ' at line 142
debug1: authentication methods list 0: password
debug1: userauth_send_banner: sent [preauth]
debug1: authentication methods list 0: password [preauth]
debug1: userauth-request for user  service ssh-connection
method password [preauth]
debug1: attempt 1 failures 0 [preauth]
Accepted password for  from  port 52466 ssh2
debug1: monitor_child_preauth:  has been authenticated by
privileged process
debug1: monitor_read_log: child log fd closed
debug1: rekey in after 134217728 blocks
debug1: rekey out after 134217728 blocks
debug1: ssh_packet_set_postauth: called
debug1: active: key options: agent-forwarding port-forwarding pty
user-rc x11-forwarding
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch
debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype
no-more-sessi...@openssh.com want_reply 0
debug1: server_input_channel_req: channel 0 request pty-req reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req pty-req
debug1: Allocating pty.

The only resolution is to forcibly terminate the spawned copy of sshd
(the one spawned by the 'sshd -d' process).

Server is running Windows 10 v1909.

I have tested, and the hang occurs in all versions of cygwin1.dll after 3.0.7.

When I revert back to cygwin1.dll 3.0.7, the problem does not occur,
and the connection succeeds.

Any ideas?

Thanks!

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Windows Restart Manager and cygrunsrv services

2020-01-27 Thread Bill Stewart
On Mon, Jan 27, 2020 at 9:19 AM Bill Stewart wrote:

> > Any ideas why Restart Manager doesn't work for cygrunsrv services?
> ...
> Question also posted on StackOverflow:
>
> https://stackoverflow.com/questions/59902201/
>
> Any insights appreciated.

According to my investigation and understanding as of this writing,
the behavior appears to be as follows:

1. Restart Manager sees the cygrunsrv.exe executable correctly as a
service and as restartable. This is good.

2. However, any executable spawned by cygrunsrv.exe as a service
(e.g., sshd.exe), is seen as NOT restartable for some reason. This is
not so good, and prevents the service from being restarted
automatically by Restart Manager.

I don't know the explanation for this behavior. It seems unintuitive
and is confusing, at the least.

Just a guess: Perhaps this behavior would be resolved if Cygwin
executables used RegisterApplicationRestart[1] ?

In any case, I have an imperfect workaround, but it would be good if
this workaround wasn't necessary.

Regards,

Bill

__

[1] 
https://docs.microsoft.com/en-us/windows/win32/recovery/registering-for-application-restart

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Windows Restart Manager and cygrunsrv services

2020-01-27 Thread Bill Stewart
On Thu, Jan 23, 2020 at 10:44 AM Bill Stewart wrote:

> However it seems that when running a service using cygrunsrv, the
> Restart Manager RmGetList API[2] returns RmRebootReasonSessionMismatch
> (2) for the lpdwRebootReasons output parameter.
>
> This parameter return value is one of the RM_REBOOT_REASON enumeration
> values[3].
>
> The description for the RmRebootReasonSessionMismatch value on MSDN is
> as follows: "One or more processes are running in another Terminal
> Services session."
>
> I ran into this building an Inno Setup installer. I reproduced on
> Windows 10 x64 and Windows Server 2008 R2 x64.
>
> The error description is interesting, because in neither repro case
> were there other users logged on using TS sessions. (I'm not sure if
> that error description is completely accurate in describing all cases
> where that value gets returned, though...)
>
> Unexpected behavior: Restart Manager returns 2
> (RmRebootReasonSessionMismatch) in the lpdwRebootReasons output
> parameter when calling the RmGetList API to detect a cygrunsrv
> service.
>
> Expected behavior: Restart Manager should return 0
> (RmRebootReasonNone) in the lpdwRebootReasons output parameter when
> calling the RmGetList API to detect a cygrunsrv service.
>
> Further details (regarding Inno Setup and this problem):
> https://groups.google.com/d/msg/innosetup/9dAT3wB9RTQ/99Py-ZgLCgAJ
>
> Any ideas why Restart Manager doesn't work for cygrunsrv services?
>
> Thanks!
>
> Bill
>
> 
>
> [1] 
> https://docs.microsoft.com/en-us/windows/win32/rstmgr/about-restart-manager
>
> [2] 
> https://docs.microsoft.com/en-us/windows/win32/api/restartmanager/nf-restartmanager-rmgetlist
>
> [3] 
> https://docs.microsoft.com/en-us/windows/win32/api/restartmanager/ne-restartmanager-rm_reboot_reason

Question also posted on StackOverflow:

https://stackoverflow.com/questions/59902201/

Any insights appreciated.

Thanks!

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: anyone interested in loading a portable drive?

2020-01-27 Thread Bill Stewart
On Sun, Jan 26, 2020 at 9:33 PM aimedtech wrote:

> Okay, this is a complaint.  I've spent the past few days trying to download 
> the Cygwin system and gotten nowhere.  I've tried several download
> environments, using different protocols, nothing works.

Remember that we can't see your screen.

When you say that something didn't work, you have to say how it didn't
work. https://devblogs.microsoft.com/oldnewthing/20100421-00/?p=14283

First, try reading the error message.
https://devblogs.microsoft.com/oldnewthing/20090625-00/?p=17753

Bill

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Windows Restart Manager and cygrunsrv services

2020-01-23 Thread Bill Stewart
Good day,

Application installers (such as Windows Installer or Inno Setup) can
use the Windows Restart Manager APIs[1] it to determine if a program
or service is running, and automatically stop/restart as appropriate.

This is useful when reinstalling or upgrading a service from an
installer, as the installer itself can stop the service, replace the
binary/binaries, and restart the service automatically.

However it seems that when running a service using cygrunsrv, the
Restart Manager RmGetList API[2] returns RmRebootReasonSessionMismatch
(2) for the lpdwRebootReasons output parameter.

This parameter return value is one of the RM_REBOOT_REASON enumeration
values[3].

The description for the RmRebootReasonSessionMismatch value on MSDN is
as follows: "One or more processes are running in another Terminal
Services session."

I ran into this building an Inno Setup installer. I reproduced on
Windows 10 x64 and Windows Server 2008 R2 x64.

The error description is interesting, because in neither repro case
were there other users logged on using TS sessions. (I'm not sure if
that error description is completely accurate in describing all cases
where that value gets returned, though...)

Unexpected behavior: Restart Manager returns 2
(RmRebootReasonSessionMismatch) in the lpdwRebootReasons output
parameter when calling the RmGetList API to detect a cygrunsrv
service.

Expected behavior: Restart Manager should return 0
(RmRebootReasonNone) in the lpdwRebootReasons output parameter when
calling the RmGetList API to detect a cygrunsrv service.

Further details (regarding Inno Setup and this problem):
https://groups.google.com/d/msg/innosetup/9dAT3wB9RTQ/99Py-ZgLCgAJ

Any ideas why Restart Manager doesn't work for cygrunsrv services?

Thanks!

Bill



[1] https://docs.microsoft.com/en-us/windows/win32/rstmgr/about-restart-manager

[2] 
https://docs.microsoft.com/en-us/windows/win32/api/restartmanager/nf-restartmanager-rmgetlist

[3] 
https://docs.microsoft.com/en-us/windows/win32/api/restartmanager/ne-restartmanager-rm_reboot_reason

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



  1   2   >